comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephe_on_the_web@toadmail.com>
Subject: Re: Quick question about Ada code formatting.
Date: Wed, 22 Feb 2006 17:21:16 -0500
Date: 2006-02-22T17:21:16-05:00	[thread overview]
Message-ID: <u1wxvxcf7.fsf@toadmail.com> (raw)
In-Reply-To: sa44q2upmik.fsf@snoopy.microcomaustralia.com.au

Brian May <bam@snoopy.apana.org.au> writes:

>>>>>> "Stephen" == Stephen Leake <stephe_on_the_web@toadmail.com> writes:
>
>     >> ----------------------
>     >> -- Process_Whatever --
>     >> ----------------------
>     >> 
>     >> procedure Process_Whatever is
>     >> ...
>     >> 
>     >> Far clearer than 2 blank lines IMHO.
>
>     Stephen> Yuck - a waste of valuable screen space. That's what
>     Stephen> syntax colorization is for, along with navigation keys
>     Stephen> (page forward goes to next subprogram).
>
> If you have long functions (yes, this might be pure evil in itself),
> then comments like the above help separate the different functions
> (even with good colour scheme this isn't always easy, especially if
> you have a lot of nested levels or even nested functions).

Nonsense. The indentation says whether a particular function
declaration is top-level or not. As others have pointed out, finding
the top level function declaration is what IDE navigation is for; in
my Emacs, 'M-page up' goes to the previous top-level function
declaration. Having the block comment there adds no information.

Please show an actual example where the comment adds information that
is _not_ present in the indentation or keyword (presumed colorized).

> However, the above is just asking for the comment to be expanded to
> clearly describe what on earth "Process_Whatever" does, and why it is
> different from the following procedures "Process_Whatever_2",
> "Princess_Whatever3", or "process_what_Ever_4".

No, that information belongs in the spec of the package.

Well, it could be that Process_Whatever is local to the package body,
and this _is_ the spec. Then there should be a comment describing it.

> (yes; I do see some crazy names used in actual code, both open source
> and closed source, that leave you thinking you know what a
> subroutine/function does when you really don't)

That's what code reviews are for :).

-- 
-- Stephe



  parent reply	other threads:[~2006-02-22 22:21 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-18 12:19 Quick question about Ada code formatting Peter C. Chapin
2006-02-18 13:00 ` Ludovic Brenta
2006-02-18 13:26 ` Simon Wright
2006-02-18 15:36   ` Georg Bauhaus
2006-02-18 16:52     ` Georg Bauhaus
2006-02-19  0:27     ` Simon Wright
2006-02-19  4:17       ` Jeffrey R. Carter
2006-02-19  9:51         ` Simon Wright
2006-02-19 15:23           ` Stephen Leake
2006-02-19 22:32             ` Simon Wright
2006-02-19 12:23       ` Georg Bauhaus
2006-02-19 22:23         ` Simon Wright
2006-02-22 22:15         ` Stephen Leake
2006-02-22 23:13           ` Georg Bauhaus
2006-02-23 12:50             ` Stephen Leake
2006-02-23 15:40               ` Jean-Pierre Rosen
2006-02-18 19:16   ` Pascal Obry
2006-02-18 21:16   ` Peter C. Chapin
2006-02-18 21:27     ` Pascal Obry
2006-02-19  0:10       ` Simon Wright
2006-02-19  9:41         ` Pascal Obry
2006-02-19  9:57           ` Simon Wright
2006-02-19 10:29             ` Pascal Obry
2006-02-19 12:31               ` Georg Bauhaus
2006-02-19 13:29                 ` Pascal Obry
2006-02-19 15:20                   ` Stephen Leake
2006-02-20  6:33                     ` Brian May
2006-02-20 18:07                       ` Pascal Obry
2006-02-22 22:21                       ` Stephen Leake [this message]
2006-02-20  8:17                     ` Lionel Draghi
2006-02-20 19:07                       ` Martin Krischik
2006-02-22 22:30                       ` Stephen Leake
2006-02-22 22:39                         ` Pascal Obry
2006-02-23 12:56                           ` Stephen Leake
2006-02-23 15:02                             ` Martin Krischik
2006-02-24 10:13                               ` Stephen Leake
2006-02-24 19:02                                 ` Martin Krischik
2006-02-24 23:29                                   ` Georg Bauhaus
2006-02-20 18:52                     ` Pascal Obry
2006-02-21  8:07                       ` Alex R. Mosteo
2006-02-22 22:32                         ` Stephen Leake
2006-02-23  6:02                           ` Jeffrey R. Carter
2006-02-23 12:58                             ` Stephen Leake
2006-02-19 19:25                   ` Jeffrey R. Carter
2006-02-19 20:00                     ` Pascal Obry
2006-02-19 22:27                       ` Simon Wright
2006-02-20  4:32                       ` Jeffrey R. Carter
2006-02-20 22:10                   ` Randy Brukardt
2006-02-22 22:36                     ` Stephen Leake
2006-02-23  9:49                       ` Alex R. Mosteo
2006-02-23 12:42                       ` Jean-Pierre Rosen
2006-02-24 10:15                         ` Stephen Leake
2006-02-20  7:11         ` Jean-Pierre Rosen
2006-02-21 21:23           ` Simon Wright
2006-02-19 15:17       ` Stephen Leake
2006-02-18 14:43 ` Martin Krischik
2006-02-18 20:21 ` Jeffrey R. Carter
2006-02-19 10:02 ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox