[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: reinstating "in env do ... end"
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 17 Aug 2010 09:56:35 -0300
> I realise this is "their problem", but I think that in many people's
> minds 'in env do' implies a lot more magic than the sugar is actually
> providing, and explicit assigning to _ENV as a local variable is more
> likely to force them to see how it actually works rather than how they
> hoped it would work. It may be ugly, but it's less confusing.
>
> In particular I remember when it was first mooted it seemed like quite
> a few people assumed at least one of the following, and were surprised
> if not frustrated when it turned out to be wrong:
>
> - Bad assumption 1: [...]
>
> - Bad assumption 2: [...]
Many thanks for this summary.
Besides this problem of bad assumptions, _ENV is also more flexible.
(For instance, it provides an obvious way to access the current
environment.)
(But I agree that it is not particularly pretty...)
-- Roberto