lua-users home
lua-l archive

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


On Sunday 20 June 2004 11:20, Jamie Webb wrote:
> On Sunday 20 June 2004 10:25, Philippe Lhoste wrote:
> > Perhaps it is a bit too much convoluted, with "complex" rules to
> > memorize, but at least it should satisfy most people, coping with most
> > cases.
>
> It is indeed rather convoluted. How exactly is this better than [**[ ...
> ]**] (bearing in mind that there can be zero stars)?

I am though in favour of C-style comments, which can be extended to ///* ... 
*/// for the arbitrary content case. The advantages being that it's less 
typing and avoids the ]] problem. I was going to suggest -# ... #- to keep 
the symmetry with the existing Lua single-line comments (can't use *- because 
it's valid Lua), but that would just be more unorthodox notation for little 
reason.

For strings, /" ... "/ might be a possibility that fits the pattern. I realise 
it's possible to divide a table by a string, but that's got to be pretty 
rare; certainly rarer than ]] in Lua, or /* (divide by pointer dereference) 
in C, and the latter has never seemed a particular burden.

-- Jamie Webb