[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.2 and 5.1
- From: Hisham <h@...>
- Date: Tue, 9 Apr 2013 12:06:49 -0300
On 9 April 2013 11:58, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2013/4/9 steve donovan <steve.j.donovan@gmail.com>:
>
>> Somebody out there really likes _ENV! Not my personal cup of strong
>> caffeinated beverage, but to each their own...
>
> Your first upvalue is the current global table, unless you don't need it.
> A name is reserved for it. Crystal-clear logic.
>
> Being someone whose first language never was Lua 5.1 (I converted to
> Luanity in November 2011, when 5.2 was already beta), I've never written
> any Lua code that calls setfenv/getfenv. They feel like curious kludges
> to me :-)
They felt that way to me even in 5.0! Well, perhaps I wouldn't say
"kludges", but they were one of those things that I always had to
double-check in the manual if I was using them right, unlike most of
the rest of the standard library, which quickly becomes second-nature.
_ENV, on the other hand, felt like second-nature from day one.
-- Hisham
http://hisham.hm/
- References:
- 5.2 and 5.1, David Burgess
- Re: 5.2 and 5.1, Matthew Wild
- Re: 5.2 and 5.1, Luiz Henrique de Figueiredo
- Re: 5.2 and 5.1, Miles Bader
- Re: 5.2 and 5.1, David Burgess
- Re: 5.2 and 5.1, Coda Highland
- Re: 5.2 and 5.1, steve donovan
- Re: 5.2 and 5.1, Joshua Jensen
- Re: 5.2 and 5.1, steve donovan
- Re: 5.2 and 5.1, Dirk Laurie