lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


David Burgess wrote:
For the sake of *large* volumes of Lua code in already in
existence, I pray the current behaviour does not change in
Lua 5.x.


Local by default is wrong. Maybe global by default is also wrong (as
David just wrote), but the solution is not local by default.

And how do you feel about either a compile or run-time option
to force the interpreter to require explicit declarations of
globals for 5.2?

The fact that large volumes of existing code run on 5.1 and
lower and use global by default is a definite show stopper
for for changing that behaviour in the 5.x stream.

Maybe the answer is to wait until 6.x to change this...if at all.

Eventually, you start with "Hmmm, I wonder if I messed up
a global name" when you debug mysterious problems :-)

Ralph