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

Re: /* ... */

Some languages have this neat feature where you can comment out pieces
of text with some form of balanced frobs.  Like in PL/1 you use "/*"
and "*/" to open and close such a comment.

I have often felt the need for such a feature in Lisp.  Specially when
I have to write large paragraphs of documentation and find that not
all the text mode commands work properly when every line starts with a

The other method of commenting code (the COMMENT fexpr) requires you
to make your english parsable by READ, and to place your comments in
places that will be EVALed.  (Also your comments end up in the UNFASL
file in MacLisp.)

I would like to propose that we adopt some kind of balanced commenting
feature in Lisp.  My initial suggestion would be that we use "#{" to
open a comment and "}#" to close a comment.  (It is a feature that it
takes TWO characters to end a comment since it allows you to use
braces with gay abandon within the comment.)  The biggest problem here
is that "#{" has a meaning in NIL.  A feature such as this is useless
unless we can get almost everyone to agree to at least tolerate it.

Other suggested characters:

#[ comment ]#		;does "#[" have a NIL meaning?
#| comment |#		;not quite as nice looking I think.
#; comment ;#		;bad idea.  Things that think they understand ";"
			;(EMACS, ZWEI, tty-prescan) will get confused.

In any case, we should be sure and have the things nest properly.
PL/1 doesn't do that correctly, and people are constantly bitching
about it.