[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: a new proposal for environments
- From: David Kastrup <dak@...>
- Date: Thu, 25 Feb 2010 18:04:52 +0100
Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:
>> On Thu, Feb 25, 2010 at 4:13 PM, steve donovan
>> <steve.j.donovan@gmail.com> wrote:
>> > Using _G specially refers to the global namespace; _ENV may or may not.
>> Using _G refers to _ENV._G, hence if you've changed _ENV, then _G
>> refers to the global namespace if and only if you added a _G field to
>> the custom _ENV pointing back to the original value of _ENV. If you
>> haven't changed _ENV, then _G and _ENV are the same thing anyway.
>
> Keep in mind that it is common to have the new environment inheriting
> from the original one (e.g., the option 'seeall' in 'module'). In those
> cases, _G is automatically accessible in the new environment, and
> it is different from _ENV.
Up to now, the difference is quite too much in the "eyes glaze over"
department for my taste.
--
David Kastrup
- References:
- a new proposal for environments, Roberto Ierusalimschy
- Re: a new proposal for environments, David Manura
- Re: a new proposal for environments, David Manura
- Re: a new proposal for environments, Jonathan Castello
- Re: a new proposal for environments, Roberto Ierusalimschy
- Re: a new proposal for environments, Tony Finch
- Re: a new proposal for environments, Luiz Henrique de Figueiredo
- Re: a new proposal for environments, Peter Cawley
- Re: a new proposal for environments, steve donovan
- Re: a new proposal for environments, Peter Cawley
- Re: a new proposal for environments, Roberto Ierusalimschy