comment style

Barry Margolin barmar at think.com
Sun Jan 6 07:35:30 AEST 1991


In article <1991Jan04.164355.15674 at sco.COM> ron at scocan.sco.COM (Ron Irvine) writes:
>The // comment style should have been adopted by the ANSI committee
>if for no other reason that to reduce the likelihood of a programmer
>falling into this horrendous trap. If // style comments had been
>used in the above program the compile would have failed.

And if they got rid of malloc and free then programmers wouldn't forget to
free storage....

Seriously, though, the purpose of a language standard is to support
portability of programs, not to hold the programmers' hands.

Also, it's quite likely that including // comments in the standard wouldn't
help so much, because many programmers wouldn't use them.  For quite some
time programmers will continue to be concerned with porting their programs
to non-ANSI compilers (the C compilers that are bundled with many popular
OSes (e.g. SunOS) aren't ANSI-compliant), so they'll use the more
compatible commenting style.

--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.std.c mailing list