
July 1, 2006
6:27 a.m.
That sounds like a bug, not a feature. It's frequently useful to have forward references in function bodies to names that are not yet globally bound, e.g. for classes, or mutually-recursive functions.
The trouble is that you don't necessarily know in what scope they will be defined, so I think that forcing you to be explicit about it is useful. Can you show me an example of where you think it isn't? Incidentally, I think that lexical scoping would also deal with the problem that people often encounter in which they have to write things like "lambda x=x:" where one would think "lambda x:" would suffice.