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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin.stu.neva.ru!news-1.dfn.de!news.dfn.de!news.uni-weimar.de!medsec1.medien.uni-weimar.de!lucks From: Stefan.Lucks@uni-weimar.de Newsgroups: comp.lang.ada Subject: Re: Is there a way to do large block of source code comments Date: Wed, 3 Sep 2014 10:28:01 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <8fd27434-43c2-4bd1-b72b-dd7a0ef5af75@googlegroups.com> NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1462710296-1409732882=:24038" X-Trace: pinkpiglet.scc.uni-weimar.de 1409725772 12419 141.54.178.228 (3 Sep 2014 06:29:32 GMT) X-Complaints-To: news@pinkpiglet.scc.uni-weimar.de NNTP-Posting-Date: Wed, 3 Sep 2014 06:29:32 +0000 (UTC) X-X-Sender: lucks@debian In-Reply-To: <8fd27434-43c2-4bd1-b72b-dd7a0ef5af75@googlegroups.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) X-Original-Bytes: 4073 Xref: number.nntp.dca.giganews.com comp.lang.ada:188821 Date: 2014-09-03T10:28:01+02:00 List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1462710296-1409732882=:24038 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 2 Sep 2014, robin.vowels@gmail.com wrote: > On Tuesday, September 2, 2014 5:04:21 AM UTC+10, Jeffrey Carter wrote: >> On 09/01/2014 10:24 AM, g.nospam@gmail.com wrote: >>> is there a way to handle several lines at a time without having to do -= - on every line? >>> like /* ... >> >>> ... >> >>> */ >> No, this was explicitly omitted. See the Ada-83 Rationale 2.1: >> [...] Such comments would require a closing comment delimiter and this= =20 >> would again raise the dangers [...] without the programmer realizing it,= so >> that the program would not mean what he thinks. > > When a block of code is to be omitted (temporarily or semi-permanently) > it's convenient to have something like /* and */ as comment markers. Convenient: Yes! Safe: No! The issue is that nesting /* and */ makes makes it difficult to parse=20 programs -- not for the computer, but for humans. At the time Ada has been= =20 originally designed, syntax highlighting editors where not so common as=20 they where today (to say the least). The designers of Ada decided to avoid= =20 these issues. > The above quotation is mere hype, like the author's justification for=20 > omitting exponentiation in Pascal, somehow more convenient to use log=20 > and exp instead! Nonsense! You don't need to agree with that decision by the Ada designers -- I am=20 not sure if I would agree with that either -- but you should understand=20 that it was something the Ada designers had carefully considered before,=20 very much unlike the Pascal example you gave, which was really an ad-hoc=20 decision, for the convenience of the compiler writer. Now, I actually think it would have been possible to have block comments=20 the Ada way (and is still possible for Ada 202X): Allow block comments=20 (I'd suggest Pascal's "(*" and "*)" for their brackets but that is a=20 matter of taste). Just prohibit nesting! I.e., any "(*" inside a block=20 comment is a syntax error. Conventional "--" comments are allowed, and any= =20 "(*" and "*)" inside a conventional comment are allowed and ignored (i.e.,= =20 not treated as block comment brackets). This language feature would allow to easily comment out large program=20 parts without safety issues. But I doubt there is actually much demand for= =20 that in the Ada community! ------ I love the taste of Cryptanalysis in the morning! ------ --Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universit=E4t Weimar, Germany-- --8323329-1462710296-1409732882=:24038--