Path: utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!rutgers!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: Nested Comments in C -- A recent experience Message-ID: <8R52RUCny2@ficc.uu.net> Date: 11 Mar 90 13:11:43 GMT References: <236100027@prism> <1414@amethyst.math.arizona.edu> <1523@wacsvax.OZ> <4320@daffy.cs.wisc.edu> <1990Mar11.065712.9798@usenet.ins.cwru.edu> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 16 | Well, for once in a long while I've got a few cents to throw in. | Just got done spending 3 hours looking for a "bug" which turned | out not to be a "bug" at all; rather it went undetected as a | programming error BECAUSE our C compiler doesn't handle nested | comments (like most C compilers don't). Alternatively, the problem was cause because the comment wasn't terminated by the end of the line. I think a better fix than making comments nest would be to add "// ... " comments like C++ uses. Then in the next release of the standard deprecate "/* ... */" comments. This would also solve the old "a = *b/*c;" problem as well. Nested comments are a fertile source of potential bugs. I'm not going to rehash the old "comment seperator in string vs. commented-out code" argument. Just sit down and think of the ramifications a little while... -- _--_|\ `-_-' Peter da Silva. +1 713 274 5180. . / \ 'U` \_.--._/ v