From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2cd0b8b65b7d84fb X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Ada's Assembly Language Comments Date: 1997/07/07 Message-ID: #1/1 X-Deja-AN: 255324894 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <5pj11i$364@mulga.cs.mu.OZ.AU> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-07-07T00:00:00+00:00 List-Id: Why use "--" to introduce comments? One little reason is that when you have large block comments, you can do (line-oriented) searches and tell whether a given line found by your search is a comment line or not. With the C-ctyle /* ... */, or the #ifdef COMMENT_OUT ... #endif, you may easily be confused by what is real code, and what is comment. The biggest reason is readability. There is never any doubt what is a comment and what is not. Interestingly, the only argument I have ever heard for preferring the /* ... */ approach was to comment out large blocks of code, but of course that only works if the large block of code had no comments at all to begin with. For what it is worth, when I write C, the only time I take advantage of the ability to stick a comment in the middle of a line of code is to make up for the lack of named parameters when calling a function (e.g. "do_sub(a, /* run_silent => */ true, /* run_deep => */ false);") -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA