lua-users home
lua-l archive

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


Salvador Espana wrote:
I think most of people that use Lua like it by its simplicity, I'm afraid
that Lua will lose this property, an undesirable damage...

I must agree with that :-)

Why not using ONLY the '#' symbol to comment the end of the line?

I suppose you mean "to comment to the EOL".
We already have --, why use something else?

You allways can nest comments like this:

# This is a long comment...
#
# # with a nested comment
# # inside
#
#

In my opinion, to nest comment is a bad programming style in general.

Well, I don't like it very much too, as it can quickly lead to confusion and error. But I think most of the time, this happens when commenting out a block of code where there is already block comments inside, a common problem in C (that's why I mostly use #ifdef DISABLEDCODE or something like that).

With single line comments, it is more easy to know which part of code is commented.

Moreover, most text editors allow you to comment an entire region with
single line comments very easily, so that to nest and un-nest comments in
this way is straightforward.

True, but some people still use Notepad or similar primitive text editor (their problem, indeed!).

And don't forget the discussion isn't about long comments alone (even if that's the subject of the thread), but also for long strings, which use a similar syntax.

--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://Phi.Lho.free.fr
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--