[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Keywords are precious (Was: [proposal / postulation]: global keyword that works with lua as config file)
- From: Andrew Starks <andrew.starks@...>
- Date: Mon, 31 Mar 2014 07:10:45 -0500
On Monday, March 31, 2014, Dirk Laurie <firstname.lastname@example.org> wrote:
> If 5.3 has new keywords, then global is just one
> more parser issue to trap, so it's not a big deal to
> trap this one too.
5.3.0.work2 has no new keywords.
Adding a new keyword to Lua is not merely an issue about
implementation details like trapping things in the parser.
It's about backward compatibility (how many existing
correct Lua programs use the name `global`?), describing
it in the manual, the keyword footprint of Lua ("fewer keywords
than the original Pascal" has a nice ring to it).
The last new keyword added was "goto". Many other languages
have it, so people tended to avoid it as a name. It solves the
problem of the missing "continue". Even so, many people felt
we could have done without it and still avoid using it.
Introducing a new keyword is like a heart transplant. It's the
last resort when less invasive surgery fails.
I said "keyword" and meant "operator".
While the bit ops may not prove to be so critical (I pridect that the will, nor for overloading), integer divide will be harder to resist.
My less there is some additional magic behind keywords, I believe that Lua's rib cage has is already even opened with 5.3. I don't see a compat52 like approach (using the types of things that it uses) working as well. It could be done, but I'm not going to use "idiv(x, y)" over 5.2-crashing "//".
I've accepted the wisdom of the list and can see the good reasons why my original idea wouldn't rise to the level of necessity, in any case.