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: border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: Is there a way to do large block of source code comments Date: Thu, 04 Sep 2014 11:19:21 -0700 Organization: None to speak of Message-ID: References: <8fd27434-43c2-4bd1-b72b-dd7a0ef5af75@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="27619"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yTGYSj4hYojmSBcq6yx5c" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:Ct18YTJPT6hSe6nKdQ0/jgqujAQ= sha1:m0G1qhsqD3FPdzncfluXGeah86U= Xref: number.nntp.dca.giganews.com comp.lang.ada:188872 Date: 2014-09-04T11:19:21-07:00 List-Id: Stefan.Lucks@uni-weimar.de writes: [...] > Now, I actually think it would have been possible to have block > comments the Ada way (and is still possible for Ada 202X): Allow block > comments (I'd suggest Pascal's "(*" and "*)" for their brackets but > that is a matter of taste). Just prohibit nesting! I.e., any "(*" > inside a block comment is a syntax error. Conventional "--" comments > are allowed, and any "(*" and "*)" inside a conventional comment are > allowed and ignored (i.e., not treated as block comment brackets). > > This language feature would allow to easily comment out large program > parts without safety issues. But I doubt there is actually much demand > for that in the Ada community! It adds safety at the cost of not being able to "comment out" blocks of code that already contain "(*"-style comments. With the existing syntax, you can easily comment out a block of text by inserting "--" at the beginning of each line, even if that block already contains either ordinary comments or previously commented-out code. Most editors can do this with a few keystrokes. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"