From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Is there a way to do large block of source code comments
Date: Mon, 01 Sep 2014 22:08:21 +0300
Date: 2014-09-01T22:08:21+03:00 [thread overview]
Message-ID: <c6juh0F7eb5U1@mid.individual.net> (raw)
In-Reply-To: <f6d1bf8f-cede-435e-9a12-ebae61ea95ca@googlegroups.com>
On 14-09-01 20:24 , gdotone@gmail.com wrote:
> the book i'm using to learn ada has a little age to it. comments are done with --
Still the case.
> . and the authors suggest
>
> ----------
> --|
> --|
> ----------
>
> for block comments or banner comments.
I use a simpler form for banners:
(two blank lines)
--
--- <banner heading/title>
--
(two blank lines)
Then I have an egrep script with the pattern
'^ *(---|type|function|procedure|package|generic)'
which produces a nice, compact table of contents of a module.
I see no need for a special formatting of "block" comments, if by that
you mean comments extending over several lines of text.
<pet-peeve>
One of the worst mistakes in the programming field is the choice of the
name "comments" for the in-source documentation and description.
"Comments" suggests something secondary, incidental, unstructured,
incomplete. In-source documentation and description should IMO be
considered as or more important than the formal source code, should be
intentional, structured, grammatical, and complete (to some selected
criterion of completeness).
</pet-peeve>
> just wondering, has there been an addition to the language
> that has created something special for multiple line commenting.
No, fortunately IMO :-)
IMO, one of the best improvements in the C standard, lately, is the
inclusion of "//" comments.
> is there a way to handle several lines at a time without having
> to do -- on every line?
Only if you build your own preprocessor, or use the C preprocessor.
What is nice is to have an editor that can adjust/fill paragraphs in
multi-line comments, while keeping the "--" in their place. I believe I
once had such an editor, but my current ones do not have this ability.
Several C coding standards I've seen suggest that multi-line comments
should use the form:
/* bla bla
* more bla bla
* even more bla bla
*/
which is no less onerous than the Ada "--" prefix, and uglier IMO.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2014-09-01 19:08 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-01 17:24 Is there a way to do large block of source code comments gdotone
2014-09-01 19:04 ` Jeffrey Carter
2014-09-03 0:07 ` robin.vowels
2014-09-03 0:44 ` Jeffrey Carter
2014-09-03 1:15 ` gdotone
2014-09-03 4:17 ` J-P. Rosen
2014-09-03 8:04 ` Brian Drummond
2014-09-03 0:50 ` Adam Beneschan
2014-09-04 2:30 ` robin.vowels
2014-09-04 15:12 ` Adam Beneschan
2014-09-03 8:22 ` Georg Bauhaus
2014-09-03 8:28 ` Stefan.Lucks
2014-09-03 8:23 ` gdotone
2014-09-03 8:57 ` Pascal Obry
2014-09-03 15:12 ` Stefan.Lucks
2014-09-03 15:52 ` Pascal Obry
2014-09-03 17:48 ` Georg Bauhaus
2014-09-03 18:28 ` Peter Chapin
2014-09-03 18:52 ` Adam Beneschan
2014-09-03 21:47 ` gautier_niouzes
[not found] ` <91e173a8-7451-4609-b141-ce3c6b19455f@googlegroups.com>
2014-09-04 5:56 ` Pascal Obry
2014-09-03 22:42 ` Georg Bauhaus
2014-09-03 21:02 ` Stefan.Lucks
2014-10-01 21:15 ` Randy Brukardt
2014-09-03 16:58 ` Jeffrey Carter
2014-09-04 18:19 ` Keith Thompson
2014-09-03 15:32 ` Shark8
2014-09-04 2:37 ` robin.vowels
2014-09-04 7:20 ` Georg Bauhaus
2014-09-04 12:46 ` robin.vowels
2014-09-04 15:44 ` G.B.
2014-09-12 2:52 ` Shark8
2014-09-01 19:08 ` Niklas Holsti [this message]
2014-09-01 20:34 ` G.B.
2014-09-01 20:53 ` Niklas Holsti
2014-09-02 13:14 ` G.B.
2014-09-02 14:38 ` kalvin.news
2014-09-02 23:33 ` Randy Brukardt
2014-09-03 8:17 ` Georg Bauhaus
2014-09-01 21:15 ` Simon Wright
2014-09-02 15:01 ` Adam Beneschan
2014-09-02 16:35 ` Simon Wright
2014-09-02 17:14 ` Jeffrey Carter
2014-09-02 19:02 ` Niklas Holsti
2014-09-02 20:10 ` mockturtle
2014-09-02 23:36 ` Randy Brukardt
2014-09-01 19:13 ` Anh Vo
2014-09-01 21:04 ` gdotone
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox