[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: a new proposal for environments
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 25 Feb 2010 11:40:11 -0300
> > _ENV is a real variable in all senses. We though about using _G, but
> > that would create a needless incompatibility for code that manipulates
> > _G. Apart from that, _G is as good a name as any other.
>
> It seems a pity to have two names for essentially the same thing.
They're not at all the same thing: changing _G has no effect, whereas
changing _ENV does. _G is just the default value for _ENV in chunks
loaded with load. More precisely, the default value is the table of
globals, which happens to be the starting value of _G.