lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> Lexical scoping only works for things literally defined inside the
>               scope. If a function is not literally written inside the
>               scope of a local variable, it does not have access to
>               that variable.

Ahhhh, that makes sense.  I was not aware that lexical scoping 
applies only during definition and not execution.  Thanks for 
clarifying this.  It may be a good 'gotcha' to note in the manual for 
people not familiar with lexical scoping behavior: that it's still static, 
and changes only 'visibility' rules.  My suggestion is hereby 
withdrawn.  I'm tempted to apply a nethack-ism: TDDTOE (the dev 
team thinks of everything).  thanks,