[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: New long comments in 5.1
- From: Philippe Lhoste <PhiLho@...>
- Date: Mon, 21 Jun 2004 10:36:15 +0200
Jamie Webb wrote:
Regarding /* */, I have nothing against them, however they don't quite mesh
with
the line comment style.
If /* ... */ were adopted, I think // should be too, with -- maybe removed in
Lua 6. Otherwise, -# ... #- is always a possibility, but I can't think of a
good string syntax to match. Maybe use #- ... -# and #" ... "#? That's nicely
consistent and extends readily to ###- ... -###.
OK, I have another proposal:
Since everybody has an opinion on the syntax of Lua, like "it shouldn't
use hard to type characters like ~ or [" or "it should look like the
language I am familiar with", I propose the ultimate flexibility: user
defined syntax.
At the start of a script (or inside an included file, or in a globaly
defined file to be loaded by Lua interpreter automatically), user should
be able to put instructions in the form:
#def legacy_form<tab>new_form
For example:
#def ~= !=
#def -- //
#def -- ##
#def --[[ /*
#def ]] */
#def or ||
#def and &&
#def do {
#def end }
and so on.
Hey, come back, that's just a joke! :-)
I certainly don't want such a nightmare...
Plus this is badly defined, as ]] is used both to end literal strings
and block comments (we can replace symbols by names), and other issues.
Note this can be done by a kind of preprocessor, anyway.
--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://Phi.Lho.free.fr
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--