comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: "use" clauses and Ada 95 OOP
Date: 1996/07/24
Date: 1996-07-24T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.96Jul24164635@spectre.mitre.org> (raw)
In-Reply-To: 4t33ro$l4n@newsbf02.news.aol.com



   In article <EACHUS.96Jul19102232@spectre.mitre.org>, eachus@spectre.mitre.org (Robert I. Eachus) writes:

   >    My rule is to always "use type" dispatching types.  The names you
   > no longer have to qualify are the ones where the qualification would
   > be misleading."

In article <dewar.838151887@schonberg> dewar@cs.nyu.edu (Robert Dewar) writes:

   > What it meant was that Robert Eachus never tried following his
   > own rule :-) As is hopefully clear from followup posts, this rule
   > cannot work.

    No, if you have seen MY followup post, it should be obvious that
this rule is not for everyone.  It only works for those user defined
operations with names in 4.5.  I am right now in the process of
converting the ADAR multiprecision arithmetic packages to Ada 95.  For
some reason, it makes sense to make the various types members of the
same class (it would be nice if I could make them scalar numeric
types, but I digress).

    For some reason all of the predefined operations on those types,
other than conversions, have names like "+", "-", ">",...  If you look
at the (Ada 83) Dates package I posted to the Team Ada list last week,
you will see the same thing.  (I'll release the package generally
later this week or early next week.)  Almost all the operations fall
into two categories, conversions between types, and Ada predefined
operators, in this case mostly comparisons.  Looking at the Ada 95
Annexes convinces me that I am not the only one who programs this way.

    So I stand by my advice.  In other areas it may not be as
useful, but that is a subject for Ada 0Y.



--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1996-07-24  0:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-17  0:00 "use" clauses and Ada 95 OOP Mitch Gart
1996-07-19  0:00 ` Jon S Anthony
1996-07-19  0:00 ` James A. Squire
1996-07-22  0:00   ` Stephen Schmid
1996-07-23  0:00     ` Laurent Guerby
1996-07-23  0:00       ` Robert A Duff
1996-07-23  0:00     ` JamesS1889
1996-07-23  0:00     ` JamesS1889
1996-07-23  0:00     ` Mitch Gart
1996-07-23  0:00       ` Kevin J. Weise
1996-07-23  0:00         ` JamesS1889
1996-07-23  0:00       ` Kevin J. Weise
1996-07-23  0:00       ` Robert Dewar
1996-07-25  0:00         ` JamesS1889
1996-07-26  0:00           ` Robert A Duff
1996-07-23  0:00       ` Robert A Duff
1996-07-24  0:00     ` Jon S Anthony
1996-07-24  0:00     ` Jon S Anthony
1996-07-19  0:00 ` Robert I. Eachus
1996-07-23  0:00   ` Robert I. Eachus
1996-07-25  0:00     ` JamesS1889
1996-07-23  0:00   ` JamesS1889
1996-07-23  0:00     ` Robert Dewar
1996-07-24  0:00     ` Robert I. Eachus [this message]
1996-07-24  0:00   ` Jon S Anthony
1996-07-20  0:00 ` James A. Squire
1996-07-21  0:00   ` Robert A Duff
1996-07-22  0:00 ` Jon S Anthony
1996-07-23  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