[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Encouraging good comments Which language ?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 30 Jan 2012 10:00:57 +0200
Op 30 januari 2012 09:40 schreef Patrick Rapin <email@example.com> het volgende:
IMHO, Lua does not encourage good commenting, because the language is
already quite clean.
Lua has no need of tautological comments, true.ÂÂ Except if the recurrent baying for syntax like `x+=++y` eventually succeeds, which is unlikely.Â
But if you like to comment properly, i.e. to explain the strategy rather than the tactics of your code, then Lua is helpful.
-- A standard construction for a comment that can start after code and goes to the end of the line.
An easy construction for a comment that spans many lines and can contain arbitrary characters.
Also useful for temporarily disabling code.
---[[ An optimally quick way to enable the code again.
-- Lua's support for literate programming tools is nonexistent (no line pragmas) and therefore you have no option but to use comments.Â :-Q