🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2297

Re: C needs reliable comments

#2297
From: P E Smee
Date: Fri, 18 Jan 1991 09:57
26 lines
1936 bytes
In article <14884@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
>In article <2893@cirrusl.UUCP> dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) writes:
>>(b) You can use #if 0 and #endif to comment out a block of code.  Then
>>if you have an invalid token or unbalanced quotes between these, the
>>"commented out" block of code, the compiler may abort compilation.
>
>This is fallacious.  If you start with valid code and "comment out" a
>section to leave valid code using #if 0 and #endif, there is no problem.
>If you wish to adopt the thesis that random character strings should be
>accepted as valid C program source code, you're even nuttier than we've
>come to expect from you.

Naw, I think he's proposing the hypothesis that there ought to be a way
for the programmer to assert 'this block is a comment, and it's none of
the compiler's business what is inside it'.  I've always wanted that,
as well.  It can be useful.  Particularly as one common reason for
wanting to comment blocks out is so you can begin debugging the bits
of a program which you think you have finished, while you're still
thinking about the bits that ought to be where you put the comment.

On the other hand, there IS a problem with his idea, still, which I've
pointed out in a response to his message.

-- 
Paul Smee, Computing Service, University of Bristol, Bristol BS8 1UD, UK
 P.Smee@bristol.ac.uk - ..!uunet!ukc!bsmail!p.smee - Tel +44 272 303132
Technical Details
Message-ID: <1991Jan18.095731.16883@gdr.bath.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!dcl-cs!gdt!exspes
References: <2893@cirrusl.UUCP> <14884@smoke.brl.mil>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!dcl-cs!gdt!exspes
From: exspes@gdr.bath.ac.uk (P E Smee)
Newsgroups: comp.std.c
Subject: Re: C needs reliable comments
Message-ID: <1991Jan18.095731.16883@gdr.bath.ac.uk>
Date: 18 Jan 91 09:57:31 GMT
References: <2893@cirrusl.UUCP> <14884@smoke.brl.mil>
Reply-To: P.Smee@bristol.ac.uk (Paul Smee)
Organization: University of Bristol c/o University of Bath
Lines: 26