lua-users home
lua-l archive

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

2009/12/11 spir <>:
> David Jones <> dixit:
>> 2009/12/11 spir <>:
>> > I would like to be able to write multiline comments using a nicer format such as:
>> >
>> >  --- starting
>> >  following
>> >  ending ---
>> Trivial changes to Lua syntax are very popular suggestions from people
>> new to Lua ("!=" is very popular too, also the use of && and || from
>> C, and of course, see endless lambda discussions).
>> Happily these suggestions never seem to result in the language changing.
>> I am amused to note that your comment syntax means that a '---' at the
>> beginning of the file would make all code comments, and all comments
>> code.
>> drj
> Pleased to read you're amused. Why you would enjoy starting a code file with an unmatched "---"? Note that your comment applies to various syntactic tokens in numerous languages. (Python coders sleep well with """ and '''.) Present Lua multiline marks introduce another issue. (Both beeing solved by proper syntax highlighting, btw.)

I think you misinterpreted the tone of David's email. I was also
amused at this when he pointed it out. Things like that are
interesting, it would allow one to embed 2 programs into one file, and
change which one executes by adding/removing a - at the top of the

On the other hand no, I'm not sure idea is practical... I also use
multiple - as separators.


PS. Please don't misinterpret the tone of /my/ email :) Assume all
emails are good-natured and you'll do fine, that's what I do.