[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: a new proposal for environments
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 25 Feb 2010 09:49:40 -0300
> So, _ENV is visible to the end-user? Also it is a "special" variable
> (as opposed to _G, which is just good old global).
> I'm not sure I like this. Special variables are evil, and I can't
> control them by overriding a couple of functions (or removing them
> from the sandbox).
The *variable* _ENV is not special in any way. The *name* _ENV is
special only to the compiler, as this is the name it uses to name
the added upvalue to the chunk and to prefix global names. In
particular, as already pointed out, anything you can do with _ENV
you can do without it, so I do not see why the need to control it.