comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Ada95 OOP Questions
Date: 1996/08/06
Date: 1996-08-06T00:00:00+00:00	[thread overview]
Message-ID: <DvqIFo.LB8@world.std.com> (raw)
In-Reply-To: 4u7h1r$jrn@mailsrv2.erno.de


In article <4u7h1r$jrn@mailsrv2.erno.de>,
Thomas Kendelbacher <Thomas.Kendelbacher@erno.de> wrote:
>I'm not advocating a ban on use clauses at all; indeed, I do use use myself
>quite often, especially for the typical case of certain base packages
>which are "with"ed everywhere in a certain project (you mentioned examples
>from GNAT itself.) ...

A useful thing to do is:

Suppose you have 17 packages that are with-ed pretty much everywhere.
Do you put 17 with-clauses on every package?  Not very readable, IMHO,
since the reader's eyes tend to glaze over with all those with_clauses,
since they're all more-or-less the same.  Instead, you can make an empty
library package, and put the 17 with's on it, and make the rest of your
software children of that empty parent.

Of course, in doing that, you require the reader to memorize all 17 of
those packages, which you shouldn't do unless they really are globally
used all over the place.  Maybe 17 is a bit high...

>>As in all style matters, I don't like absolute rules,
>
>--neither do I!--

Nor me.  But since we haven't defined what "style" means, this is pretty
meaningless.  There are some rules in the RM that could be considered
"style rules", and yet they are absolute -- the compiler will complain
if you violate them.

An absolute rule like "never use unchecked conversions" is bad.  But an
absolute rule like "never use unchecked conversions without saying so"
is good (and that's what the RM says, since it requires a "with
Unchecked_Conversion;" at the top).  Both rules are absolute, but one is
good and one is bad.  Of course another good rule is, "Don't use
unchecked conversions unless necessary", but the RM doesn't say that,
since it's a matter of opinion.

- Bob




  reply	other threads:[~1996-08-06  0:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-28  0:00 Ada95 OOP Questions Spasmo
1996-07-28  0:00 ` Andre Spiegel
1996-07-28  0:00   ` Spasmo
1996-07-29  0:00     ` Thomas Kendelbacher
1996-07-31  0:00       ` Spasmo
1996-08-01  0:00         ` Thomas Kendelbacher
1996-08-02  0:00         ` Gene Ouye
1996-08-01  0:00       ` Jon S Anthony
1996-07-30  0:00     ` David Wheeler
1996-07-31  0:00       ` Spasmo
1996-07-30  0:00     ` Ken Garlington
1996-08-04  0:00       ` Spasmo
1996-07-28  0:00 ` David C. Hoos, Sr.
1996-07-28  0:00   ` Spasmo
1996-07-29  0:00 ` Andre Spiegel
1996-07-29  0:00   ` Thomas Kendelbacher
1996-08-02  0:00     ` Robert Dewar
1996-08-05  0:00       ` Thomas Kendelbacher
1996-08-06  0:00         ` Robert Dewar
1996-08-06  0:00           ` Thomas Kendelbacher
1996-08-06  0:00             ` Robert A Duff [this message]
1996-08-07  0:00               ` Robert Dewar
1996-08-08  0:00                 ` Robert A Duff
1996-08-09  0:00                   ` Robert Dewar
1996-08-12  0:00             ` Robert I. Eachus
1996-08-08  0:00           ` Theodore E. Dennison
1996-08-09  0:00             ` Robert Dewar
1996-08-12  0:00             ` Joel VanLaven
1996-08-06  0:00         ` Robert I. Eachus
1996-08-10  0:00         ` Chris Morgan
1996-07-29  0:00   ` David Wheeler
1996-07-30  0:00     ` Spasmo
1996-07-30  0:00     ` Spasmo
1996-07-30  0:00 ` Andre Spiegel
1996-07-30  0:00 ` Andre Spiegel
1996-07-30  0:00 ` Robert I. Eachus
1996-08-01  0:00 ` Jon S Anthony
1996-08-13  0:00 ` Eric C. Newton
1996-08-14  0:00 ` Eric C. Newton
1996-08-14  0:00 ` Jon S Anthony
1996-08-14  0:00 ` Ken Garlington
1996-08-21  0:00 ` Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-08-08  0:00 W. Wesley Groleau (Wes)
1996-08-20  0:00 Farshad Nayeri
1996-08-20  0:00 Farshad Nayeri
1996-08-21  0:00 ` Jon S Anthony
replies disabled

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