[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: New long comments in 5.1
- From: Philippe Lhoste <PhiLho@...>
- Date: Sat, 19 Jun 2004 13:23:10 +0200
Philippe Lhoste wrote:
Just one thought:
Block comments and literal strings are mostly meant for enclose large
number of lines (less for literal strings that are useful, amongst other
strings, to enclose Dos paths). At least, that's where there is the most
likely potential problems.
Literal srings have already some conventions, like if they start by a
new line, it is not enclosed in the string.
Why not make another convention, like starting (some) multiline block
comments (literal strings) with --[[[ ([[[) anywhere in a line and
ending them with ]]] (or --]]] as it is convenient) only at the start of
line, a bit like the Perl/PHP HereDoc?
It lifts a lot of potential problems, as we rarely find code like:
val = t[a[f[i
]]] * 2;
Or, if really we want to take care of all cases, we can use the HereDoc
longText = [[TERMINATOR
TERMINATOR]]; -- Always at start of line
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist