[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The removal of function environments: An opportunity for optimization?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 24 May 2010 14:34:11 -0300
> 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