lua-users home
lua-l archive

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


Mark Hamburg <mark@grubmah.com> wrote:
>
> What if the lightweight syntax didn't support functions with upvalues?
> One could still reference globals, but a reference to a lexically bound
> but non-local variable would be an error in a lambda expression,
> whatever the syntax.

Note: in 5.2 _ENV is an upvalue; forbidding upvalues also forbids globals.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Fisher: West or southwest, veering east or northeast, 4 or 5, decreasing 3 at
times. Slight or moderate. Fog patches. Moderate, occasionally very poor.