A change of the language! Then please change its name too.
It is just a suggestion, I am not part of the Lua team, and I never
said that this must be the solution. I explicitly said, it
would be a nice solution for us. What I might will do is to patch
the parser, you don't need to install that patch in your Lua if you
don't want to. And of course if it ever would be part of vanilla Lua
the name of Lua will change, I suggest "Lua 5.3" or "Lua 5.4" maybe
"Lua 6" (again, just a suggestions).
I accept that your programming style is such that bugs arising from
unintentional assignment to globals are the bane of your life.
It's not my code that is causing problems, its code of others that
happen to run on our systems. I would like to help those programmers
finding their errors.
But my programming style is such that I almost never have such bugs.
I deeply admire your ability to write bug free code. But
unfortunately not all programmers share your ability. Actually one
of the main goals of our project is to provide the means of writing
scripts for non-computer scientists.
Why force me to the inconvenience of not having assigments to globals,
when your problem can easily be solved by either of two ideas already
suggested in this thread?
1. It is trivial to disallow assignments into any table, including _ENV.
2. Text editors are available that highlight assigments to globals in
a hard-to-miss way.
No one will ever force you to use any Lua interpreter that is not
the one you want to. Stick with 5.1 or 5.2 or whatever you are using
as long as you want to. The two suggestions you make are nice, and
we already implemented number 1 (I wrote that already in the very
first mail) and I already planned to do number 2.
I would not be so defensive about suggestion, honestly. Why bother?
It doesn't mean that you will have to follow any of those changes in
your project, nobody will force you. Nobody will sneak into your
computer over night and change your Lua version while you are
sleeping.
--
Thomas
|