lua-users home
lua-l archive

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


> Does it make sense to imagine a line such as "local _ENV = <_G>" at
> the top of every chunk, where <_G> is the default global environment
> table?

Yes; see the original proposal:

> 1) Any chunk is compiled as if surronded by the following code:
> 
>     local _ENV = <some value>; function (...) <chunk> end
> 
> By default, <some value> is the global table

(http://lua-users.org/lists/lua-l/2010-02/msg00753.html)

-- Roberto