lua-users home
lua-l archive

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

Dynamic scoping looks for variable definitions by looking up the call stack.
Lua does not do this. The original version of LISP does this.

Lexical scoping looks for variables by looking through the lexical nesting
in the source code. Lua and Scheme do this.

I was going to describe PostScript as doing dynamic scoping, but what it
really does is look things up in the dictionary stack which could be
emulated in Lua through proper manipulation of the global environment.