lua-users home
lua-l archive

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


Hi,

> Roberto Ierusalimschy:
> > Lexical scoping is simpler than upvalues

I agree with Roberto on this.  Lexical scoping only becomes somewhat
puzzling if you care about how it's implemented.  Lua's "constant" upvalues
are simpler to understand in that respect.  The special % syntax and the
need to pull locals to the innermost scope before turning them in upvalues
can't match the new system however.  And on the implementation side: you can
safely rely on lexical scoping, its implementation is very tight.  Nice
work!

Bye,
Wim