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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ad62d6b425bebfec X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: "use" clauses and Ada 95 OOP Date: 1996/07/24 Message-ID: #1/1 X-Deja-AN: 170120990 references: <4t33ro$l4n@newsbf02.news.aol.com> organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-07-24T00:00:00+00:00 List-Id: In article , 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@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...