lua-users home
lua-l archive

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

2018-07-05 13:47 GMT+02:00 Pierre-Yves Gérardy <>:
> On Thu, Jul 5, 2018 at 12:11 PM, Dirk Laurie <> wrote:
>> 2018-07-05 10:40 GMT+02:00 Viacheslav Usov <>:
>>> On Thu, Jul 5, 2018 at 8:47 AM Marc Balmer <> wrote:
>>>> How was I unclear or neutral when I wrote "It's a bad idea?".
>>> That was not in response to "is this a problem worth solving",
>> So the OP's diatribe against globals is to be split in three parts,
>> each requiring that its predecessor is taken for granted.
>> (a) the status quo is bad;
>> (b) we need a way to specify whether a variable is global;
>> (c) one such way is to put a dollar sign in front of the name.
> I'd add a distinction between folks who think the way globals are
> handled should stay the way it is and folks who are fine with it as is
> but wouldn't mind if it changed.
> I'd expect many Lua users to fall in that category.

Well, I am in that category. I wouldn't mind if it changed, provided
that the change is non-breaking.

I don't think, though, that a non-breaking change (or even
a breaking change) is possible before runtime. The reason
for that is that the distinction between compile time and
runtime is illusory in any interpreted language that offers
a function like `load`.

And as I and others have pointed out repeatedly, it is already
possible, even easy, to obtain the desired effect at runtime.

So I simply think the whole thread was sparked by a non-solution
to a non-problem.