Does the Compiler treat methods and DoIts differently (apparently, it does, and I guess there are good reasons not to optimize simpe DoIts).
The compiler treats all code the same, however the semantics might be different than what you would expect. For example workspace variables share the semantics of global variables, thus they do not behave the same way as temporary variables do when used with closures.
Lukas