lua-users home
lua-l archive

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


It also points out the dangers of using antediluvian sources:-) Very few
meet the test of time. The question that I have is why do we need global
variables. If the language becomes fully lexically scoped, then variables
declared at the proper level will become visible at all levels below.
Why build a separate table for global variables. Just seems unnecessary,
time consuming, and a creater of more baggage to haul around.

Everett L.(Rett) Williams
rett@gvtc.com

"John D. Ramsdell" wrote:

> Reuben Thomas <rrt@dcs.gla.ac.uk> writes:
>
> > This is the heart of the misunderstanding then. The trouble is that
> > "lexical scope" means different things to different people. For
> > example, in the Dragon Book (Aho, Sethi & Ullman, 1986), the authors
> > write "A common rule, called the lexical- or static-scope rule..."
> > (p. 411). This is the definition I was using.
>
> I've been trained to think about Algol when determining if a language
> is lexically scoped, and that static scope just means the resolution
> of variable references to variable bindings can be done a compile with
> a static analysis of the program.  The Python people seem to use
> lexical scoping as I do, because their language was always statically
> scoped, but just recently became lexically scoped.  As your reference
> suggest, not everyone agrees with this distinction.
>
> John