[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Redefining locals
- From: Matt Hellige <matt@...>
- Date: Thu, 11 Nov 2004 14:00:09 -0600
[Roberto Ierusalimschy <roberto@inf.puc-rio.br>]
> > 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
--
Matt Hellige matt@immute.net