Nested Comments (long summary)

Ted Ying ted at welch.jhu.edu
Sat Feb 24 04:11:10 AEST 1990


Nice summary!  I think that you tried to be fair to both sides of the
debate, however, I disagree with you on certain points (as to the weight
of arguments).  Then again, I am a purist, according to your definition so
it falls to logic to assume that I would favor that side:

In article <648 at mwtech.UUCP> martin at mwtech.UUCP (Martin Weitzel) writes:
>
>1) Give the programmer the possibility to 'comment out' some
>   code, especially during phases of debugging and testing.
>2) Avoid the possibility of introducing 'subtle bugs'.
>3) Care about efficiency of the Compiler when parsing
>   (or here better "lexing") some source file.
>4) Problems with rules for exact semantics of nested of comments.
>
> [...arguments for/against (1)...]
>
>On the next round (2) I think, the NESTERs have a little more
>weight on their side, because the subtle bugs they have shown
>(mistakenly typing * / instead of */) seem a little more probable
>and far harder to detect.
>
	Here, I disagree.  The subtle bugs that affect non-nested
	comments are still as evident in nested comments.  Additionally,
	there are other subtle problems that come in with nested
	comments that are not there for non-nested comments.  For
	example, with nested comments you have to add in a check for
	strings (double quotes) before you increment your level-counter
	for comments.  If you don't take into account, or don't take
	into account properly, then you have another subtle error.  THe
	problem of '* /' vs. '*/' should have the same effect on the
	compilation of the program whether or not you are nesting
	comments.  Thus I find that nesting doesn't solve any problems,
	and could create more. 

> [...arguments for/against (3) and (4)...]
>
	As I said, I find that it was a nice summary.  I thought the
	detail in arguments around issue (4) were nicely written and
	agree with them.

	Ted Ying			ted at welch.jhu.edu

#include <std.disclaimer.h>
Approximating the Taylor series:
	Mike Todd + Eddie Fisher + Richard Burton + John Warner + ...



More information about the Comp.lang.c mailing list