lua-users home
lua-l archive

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

[Roberto Ierusalimschy <>]
> > One can certainly define some sort of partial closure as in this case,
> > and it definitely has programming uses.  But it's not full closure. :-)
> The definition of lexical scoping used by Lua is the same definition
> used by Scheme, Pascal, and mostly all definitions found on the
> literature. If you insist on a different definition, what can we say?

I agree. There is absolutely no doubt that Lua is a textbook example
of lexical scoping. The behavior that Rich is talking about is
implemented, for example, in Java's inner classes, where it is
universally hated. The Java implementation is generally considered an
implementation shortcut taken to avoid having to implement true (or at
least traditional) lexical scoping. 


Matt Hellige