[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.2 feature list?
- From: John Hind <john.hind@...>
- Date: Wed, 04 Oct 2006 09:44:32 +0100
The main thing I do not like is "global-by-default" and there seems to
be a fair bit of support for that. Compatibility does not need to be a
problem if the transition is thought through. New Lua hosts can adopt
global-by-declaration, existing hosts upgrading Lua can switch it on or
off. Individual chunks can reverse the implementation default with a
directive at the start of each chunk.
However I do not really see why local-by-default is such a problem. In
the Lua cant, it just means that if "x" cannot be resolved at any point
in interpretation, "x = 1" gets treated as "syntactic sugar" for "local
x; x = 1". Of course, if you want it to be in an outer scope, you have
to pre-declare in that scope.