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: mheaney@ni.net (Matthew Heaney) Subject: Re: Is ADA as good for graphics programming as C? (WAS: Re: Avoiding the second historic mistake) Date: 1997/07/09 Message-ID: #1/1 X-Deja-AN: 255865135 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> Organization: Estormza Software Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel,comp.lang.c,comp.lang.c++ Date: 1997-07-09T00:00:00+00:00 List-Id: In article , abo@minkirri.apana.org.au (Donovan Baarda) wrote: >Can you inherit from an INTEGER? Subtyping is not the same thing. Is there >a parent class to INTEGER and FLOAT that can be used by a class that >manipulates either? Wegner described contrasted "subtypes" and "subclasses." A subtype has range semantics, in the sense that a subtype constrains the range of values that may be designated by an object. A subclass has template semantics, in the sense that a subclass constrains the behavior of its parent. But you can think of an object of a subclass as only being able to designate fewer values, because it has more behavior constraints. Ada has both specialization mechanisms. However, "type extension" is not available for numeric types such as Integer or Float, only subtype (range) constraints. So, numeric types such as Integer or Float are not related in any kind of inheritence hierarchy (ie don't have a common superclass). 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. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271