comment style

David Tanguay datangua at watmath.waterloo.edu
Wed Jan 9 11:35:43 AEST 1991


In article <17968:Jan804:38:1591 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>No. #2 is an objective fact and #3 is a widely accepted principle of
>visual design: parallel lines are striking. Read Tufte's books.

Then Tufte is wrong, at least in this instance :-) One of the problems I
have found with C++ code is that I don't see the comments (caveat: I've not
looked at a lot of C++ code). The // looks like a letter to me (it's almost
an italic N).

>No, not when they're done correctly. When you have end-of-line comments
>there's no need for continuation characters. *All* characters are
>ignored between // and newline inclusive.

What about:

#define BLAH	stuff	// comment about BLAH
	some code here

If the newline is stripped, then "some code here" becomes part of the macro,
which seems nasty.
-- 
David Tanguay            Software Development Group, University of Waterloo



More information about the Comp.std.c mailing list