Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari!aplcen!boingo.med.jhu.edu!welch.jhu.edu!ted From: ted@welch.jhu.edu (Ted Ying) Newsgroups: comp.lang.c Subject: Re: Nested Comments (long summary) Message-ID: <1990Feb23.171110.1608@welch.jhu.edu> Date: 23 Feb 90 17:11:10 GMT References: <1523@wacsvax.OZ> <13706@cbnewsc.ATT.COM> <4286@jhunix.HCF.JHU.EDU> <648@mwtech.UUCP> Reply-To: ted@welchlab.welch.jhu.edu (Ted Ying) Organization: Welch Medical Library, Baltimore Lines: 45 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@mwtech.UUCP> martin@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@welch.jhu.edu #include Approximating the Taylor series: Mike Todd + Eddie Fisher + Richard Burton + John Warner + ...