[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nested comments, 3
Original-Via: uk.ac.ukc; Thu, 20 Sep 90 12:10:21 BST
From: Kent Karlsson <kent>
Date: Thu, 20 Sep 90 12:23:45 +0200
To: haskell@cs.glasgow.ac.uk
Subject: Re: nested comments, 3
Original-Sender: kent%se.chalmers.cs@sunic.sunet.se
Sender: haskell-request@cs.glasgow.ac.uk
On the third alternative
-------------------------
But there is a third alternative:
> Another route is to take the minimalist view of the ADA
> designers, which is:
>
> there is NO block comment rule which is entirely safe from
> accidental closure of the comment.
>
> This lead them to -- commenting out the rest of the line, as
> the ONLY comment syntax. To comment out a block, invoke your
> powerful text editor - not too hard these days.
I agree, though I do NOT think that "--" is the typographically best
choice to mark the beginning of a comment. E.g. "@@@" is MUCH more visible,
and and I think that comments really should be clearly visible.
(And it is more likely that someone wants to use "--" as an operator...)
Having ONLY to-end-of-line comments also has the GREAT advantage that
the comment mark is clearly visible even if MANY lines, even several pages,
are comments. Recall the (other) "C-ism" (which is only a convention):
/*
** ...
** ...
** ...
*/
Annotations (another use for block comments) can also be terminated
by end-of-line... Even conditional compilation can be done in such a way:
...
###MAC### ... @@@ MacIntoch specific code.
###MAC### ...
###SUN### ... @@@ Sun specific code.
###DEC### ... @@@ Dec specific code.
...
/kn