[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: Enrico Tassi <gareuselesinge@...>
- Date: Fri, 8 Jan 2010 14:56:18 +0100
On Fri, Jan 08, 2010 at 11:31:02AM -0200, Roberto Ierusalimschy wrote:
> > > It will still change the environment of its caller, but for
> > > compatibility only. This will be a documented compatibility behavior,
> > > because it affects new code. (Outside the "in module() do ... end" you
> > > will still be inside the module...)
> >
> > I guess someone will be surprised by this then:
> >
> > in module("foo") do
> > ...
> > end
> > print() -- Fails rather unexpectedly.
>
> That it was I meant by "it affects new code".
Maybe I missed something, but if the choice is between switching on a
compatibility flag that makes the new 'in ... do ... end' construct pretty
unusable (see Mike's example) or switching it off and make all old code
using 'module()' unusable... I'd prefer having no compatiblity flag at all,
and maybe call it 6.0 instead of 5.2.
Cheers
--
Enrico Tassi
- References:
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- 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