|
On 11/17/2012 03:47 AM, Dirk Laurie wrote:
Except for local variables, including function parameters, for-loop variables, etc.Lua has no variables (i.e. preallocated named blocks of memory the contents of which may change), only names and values. Lua names are not independent entities. They are indices into the global environment. The following statements do the same: a = b/c _ENV.a = b/c _ENV["a"] = b/c I.e. all Lua assignments involve a table,
Except for above-noted cases. Not that I'm in favor of lexical typing, but the metamethods aren't a _complete_ replacement.and you can intercept those assignments