[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: modules, require, magic
- From: Josh Simmons <simmons.44@...>
- Date: Mon, 17 Oct 2011 12:07:03 +1100
On Mon, Oct 17, 2011 at 11:43 AM, Petite Abeille
<petite.abeille@gmail.com> wrote:
>
> On Oct 17, 2011, at 2:33 AM, Josh Simmons wrote:
>
>> When replaced by the arduous few lines
>> required in 5.2 the semantics are clear to anybody with a basic grasp
>> of Lua constructs.
>
> Right. Looking forward to the avalanche of very pointed questions about what the (*&^(%*$%$# that magical _ENV thingy is. Remember, ipairs is apparently over the top already.
>
>
>
Not sure why you think the problem with ipairs was magic, it was just
deemed (for a little while at least) unnecessary.
_ENV is a core construct of Lua, something you're going to have to
understand eventually anyway, it's not a restrictive single purpose
function replaceable with ~3 lines of trivial Lua in your module file
where the latter also provides more useful and obvious semantics.
I'd also note that it's not necessary or beneficial to touch _ENV at
all in your module unless you're doing something weird.
- References:
- modules, require, magic, Eduardo Ochs
- Re: modules, require, magic, Petite Abeille
- Re: modules, require, magic, Matthew Wild
- Re: modules, require, magic, Petite Abeille
- Re: modules, require, magic, Josh Simmons
- Re: modules, require, magic, Petite Abeille