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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!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: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Is there a way to do large block of source code comments Date: Thu, 04 Sep 2014 09:20:47 +0200 Organization: A noiseless patient Spider Message-ID: References: <8fd27434-43c2-4bd1-b72b-dd7a0ef5af75@googlegroups.com> <65680926-cda9-40a6-8f45-3a1f80452020@googlegroups.com> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 4 Sep 2014 07:20:48 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="a631f4a085ededc0f5b0769b7fe21a52"; logging-data="24206"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vzOmgIQg1CfNS+2Ygi/pUd25mcVq173s=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <65680926-cda9-40a6-8f45-3a1f80452020@googlegroups.com> Cancel-Lock: sha1:rjgBgWaUA/RL6IyB3RCNWTDW9VQ= Xref: number.nntp.dca.giganews.com comp.lang.ada:188859 Date: 2014-09-04T09:20:47+02:00 List-Id: On 04.09.14 04:37, robin.vowels@gmail.com wrote: > Um, comments highlighted in a different color from the code > make it clear which is commented. But highlighting doesn't make it clear what the "commented" text is about, and how it is structured. Since the text is still there, the current reader (human debugger, reviewer, successor) frequently needs to understand it. (*) Using comment indicators for disabling some source text is the original sin. However, since the practice of "quickly disabling" a part of the source text during coding is commonplace, languages could as well start supporting that! Specifically support that, I mean, not via generic comments. It needs to be the language, because the tools would have to be at least as good as the compiler and its error handling code. But current tools tend not to be language specific. Another technique that may do during coding, provided that there are no far reaching declarations that will vanish: if False then as_if (commented); here_as (well); end if; The effect on a future reader will be just as annoying as a "commented multiline section" of code. Fans of editors may use folding to hide either from sight. __ (*) With luck, an equipment actually supports a programming language, in full, even in the presence of grammars like Ada's and in the presence of syntax errors. Most don't, for example, the fail when ''' is not paired, or when comment delimiters are part of strings.