[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: require, module, globals and "magic"
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Mon, 16 Aug 2010 15:24:02 +0200
2010/8/16 steve donovan <steve.j.donovan@gmail.com>:
> On Mon, Aug 16, 2010 at 2:38 PM, Jerome Vuarand
> <jerome.vuarand@gmail.com> wrote:
>> Not OK, the move to _ENV is to give back to closure the control of
>> their global variables. If the module wants to change its _ENV, it
>> should do so explicitly :
>
> But ... we all understand module(...) now, and its limitations. Why
> deprecate a nice bit of sugar because sugar is theoretically evil?
This is no longer sugar, the environment replacement feature of module
relies on a core feature that is considered deprecated in 5.2
(changing the caller environment).
> Remember that this will involve a fair amount of incompatible module
> rewriting, and keeping 5.1 and 5.2 versions going in parallel during
> the transition. This was not a big problem with the 5.0 -> 5.1
> change-over, especially with compat5.1.
IMHO one of the key features of Lua is its lack of full backward
compatibility, or stated differently its ability to evolve. And while
the environment replacement may only be deprecated rather than
removed, the important point is the addition of the return value to
module.
> Better static analysis tools, better development environments: this
> will help programmers more than core language changes.
The fact is that some people are available to make core language
changes, for free. Analysis tools, IDEs, all of that require a fair
amount of work and I'm not sure the community is big enough to provide
that.
> PS. but package.seeall must go, it _is_ evil ;)
I guess there are several daemon teams in hell and we're not
supporters of the same one :-)
- References:
- require, module, globals and "magic", Nevin Flanagan
- Re: require, module, globals and "magic", steve donovan
- Re: require, module, globals and "magic", Lorenzo Donati
- Re: require, module, globals and "magic", steve donovan
- Re: require, module, globals and "magic", steve donovan
- Re: require, module, globals and "magic", Luiz Henrique de Figueiredo
- Re: require, module, globals and "magic", Petite Abeille
- Re: require, module, globals and "magic", Jerome Vuarand
- Re: require, module, globals and "magic", steve donovan