[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: Mark Hamburg <mark@...>
- Date: Fri, 8 Jan 2010 09:05:51 -0800
On Jan 8, 2010, at 6:13 AM, Roberto Ierusalimschy wrote:
> It would be trivial to include a new 'module' function (the only real
> problem being how to call it) that does not change the environment.
> New code uses "in newmodule() do ... end", old code continues to use
> "module()".
>
> But I do not undestand why the single module function is "unusable".
> Usually chunks define a single module, so there is no code after the
> 'end' for this quite common usage. In particular, this style is
> mandatory with the old module function. (That was the reason we opted
> to not define a new module function.)
If module is going to keep doing a setfenv, then will people have any motivation to write "in module( ... ) do < statements > end" as opposed to just "module( ... ) < statements >"?
Mark
- References:
- Re: Lua registry, environment, and threads., Christian Tellefsen
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Mark Hamburg
- Re: Lua registry, environment, and threads., Patrick Donnelly
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Mike Pall
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Mike Pall
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Enrico Tassi
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy