comment style

Karl Heuer karl at ima.isc.com
Mon Jan 7 16:20:03 AEST 1991


In article <1050:Jan701:40:4791 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>In article <613 at caslon.cs.arizona.edu> dave at cs.arizona.edu (Dave P. Schaumann) writes:
>> I see no compelling reason to have //, and have heard
>> no argument for // that doesn't boil down to 'I like it that way better'.
>
>[Several arguments deleted]

My favorite is the observation that virtually all% one-line comments end with
a newline following the "*/", and virtually all% multi-line comments have
cosmetic punctuation (usually " * ") at the beginning of each line, anyway.
So it seems clear that the programmers are, at some level, *thinking* in terms
of comment-to-EOL, and it probably would have been better for the comment
syntax to have reflected that in the first place.

I don't claim this is a compelling reason, and I won't even dispute that it's
just a variant of "I like it that way better".  The fact that I first came up
with this idea, including the "//" symbol, years before I knew that BCPL and
C++ used "//" comments, will be of interest to those individuals who take an
interest in that sort of thing.

Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint
________
% There are a few exceptions, but I don't find *them* compelling, so there :-)



More information about the Comp.std.c mailing list