Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.std.c Subject: Re: comment style Message-ID: <1991Jan5.203530.20366@Think.COM> Date: 5 Jan 91 20:35:30 GMT References: <1991Jan04.164355.15674@sco.COM> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 24 In article <1991Jan04.164355.15674@sco.COM> ron@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@think.com {uunet,harvard}!think!barmar