On 2/27/2013 2:55 PM, Nick Sabalausky wrote:
I like that, but "run arbitrary code at top level" may be a bit of a problem because it conflicts with allowing forward references.Ie, for example: void foo() { bar(); } void bar() { i = 3; } int i; vs: void main() { void foo() { bar(); } void bar() { i = 3; } int i; } The first one works, but the second doesn't. And my understanding is that the second one not working is a deliberate thing related to not being in a declaration-only context.
It's a little more than that. People have a natural view of function bodies as executing top down. Functions also tend to be simple enough that this makes sense. People have a natural view outside functions as everything happening in parallel.
