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: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 109fba,2c6139ce13be9980 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,3d3f20d31be1c33a X-Google-Attributes: gid1014db,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Is ADA as good for graphics programming as C? (WAS: Re: Avoiding the second historic mistake) Date: 1997/07/15 Message-ID: #1/1 X-Deja-AN: 257076807 References: <33957A33.1C31AB44@oma.com> <865898351snz@nezumi.demon.co.uk> <339ED54C.215A5F85@oma.com> <5noc8u$a8m$3@miranda.gmrc.gecm.com> <33A032AC.2D8BA85C@oma.com> <5nrn86$cvo$3@miranda.gmrc.gecm.com> <33A1CBBB.B0602EC@oma.com> <5o2uls$ku3$2@miranda.gmrc.gecm.com> <33A6ADDA.2099EEB9@oma.com> <33A7D2DE.545B@polaroid.com> <33A9338D.10BB@polaroid.com> <33B09D64.E7F99DA3@saguarosoft.com> <33B16CBB.417A@gdesystems.com> <33C4AF0E.339D@calfp.co.uk> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel,comp.lang.c,comp.lang.c++ Date: 1997-07-15T00:00:00+00:00 List-Id: In article <33C4AF0E.339D@calfp.co.uk> Nick Leaton writes: > Matthew Heaney wrote: >> Different languages have made different choices with respect to >> whether all types should be part of a common hierarchy. That >> Eiffel did so, and Ada did not, should not be construed as >> better, just different. > I'm not sure about this. If you don't have a common hierarchy, then that > precludes you from using a common root. Now this is useful when we look > at container classes. It is particularly useful when you can constrain > the type that is store in a container to a particular type. > By having a common hierarchy you are not limited from doing anything > that you can without one. However the reverse is not true. Therefore a > common heirarchy is the better solution. But you should never let consistancy get in the way of doing the "right" thing. Ada does have a common hierarchy, but as it says right under the language-defined class chart at RM 3.2(12), "The classes 'numeric' and 'nonlimited' represent other classification dimensions and do not if into the above strictly hierarchical picture." RM 3.2(13) In Ada integer types are grouped with enumeration types into discrete types, while floating point types are grouped with ordinary fixed point types and decimal fixed point types into real types. Of course, if you don't like this hierarchy, you can create your own, and even if you want have all classes rooted at 'Object'. But you will lose some of the richness of the Ada organization if you stay inside such a family of classes. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...