This one bit me today

P E Smee exspes at gdr.bath.ac.uk
Wed Oct 25 19:06:16 AEST 1989


In article <1989Oct23.160518.28851 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>I'm fairly sure that Doug agrees with me on this one:  it's highly desirable
>for compiler vendors to make *useful* innovations, but nested comments aren't.
>They're an attempt to fix something that basically isn't broken.

But they *can* be useful, particularly in the development stages of a
program.  If contents nest, then you can comment out blocks of your code
for various trial purposes, without having to worry about what's in the
block you comment out.  I've known PL/1 programmers to avoid commenting
their code because (since PL/1 comments don't nest) it would inhibit this
handy testing trick.

I *will* grant that I feel strongly that nested comments should *not* be
the default, but should require that the capability be turned on using
a compiler control argument; and that any sane company would establish
as policy that this option *could not* be used in compiling production
or release versions of the code. 
-- 
 Paul Smee               |    JANET: Smee at uk.ac.bristol
 Computer Centre         |   BITNET: Smee%uk.ac.bristol at ukacrl.bitnet
 University of Bristol   | Internet: Smee%uk.ac.bristol at nsfnet-relay.ac.uk
 (Phone: +44 272 303132) |     UUCP: ...!mcvax!ukc!gdr.bath.ac.uk!exspes



More information about the Comp.lang.c mailing list