Newsgroups: comp.object,comp.lang.smalltalk,comp.lang.ada
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!rutgers!psinntp!psinntp!psinntp!psinntp!merlin.hgc.edu!jcm
From: jcm@hgc.edu (James McKim)
Subject: Re: Has C++ had its day?
Message-ID: <1995Jul5.134421.10029@merlin.hgc.edu>
Sender: usenet@merlin.hgc.edu (Action News Central)
Organization: The Hartford Graduate Center
References: <dewar.804646227@hgc.edu> <NEWTNews.804892304.14898.sellers@sellers.sellers.com>
Date: Wed, 5 Jul 1995 13:44:21 GMT
Lines: 48
Xref: glinda.oz.cs.cmu.edu comp.object:34362 comp.lang.smalltalk:25485 comp.lang.ada:32126

In article <NEWTNews.804892304.14898.sellers@sellers.sellers.com> John Sellers <sellers@sellers.com> writes:
>
>In Article<1995Jul3.143029.23983@merlin.hgc.edu>, <jcm@hgc.edu> 
>write:
>> ...
>> from the Eiffel Library Kernel Standard.
>> 
>> Some objects are NUMERIC (understand +,-, etc). Some are 
>COMPARABLE (understand
>> <, <=, etc.). REALs and INTEGERs are _both_, and so 
>conceptually are subtypes
>> of both. With multiple inheritance we can model the concept. 
>With single 
>> inheritance, which do you inherit from and how do you handle 
>the other one?
>> ...
>
>In Eiffel, what is an example of NUMERIC that isn't COMPARABLE?

Well, any class that supports arithmetic operations but not ordering
relations will do. COMPLEX and MATRIX come to mind immediately.

>
>In Smalltalk these are usually handled by a single hierarchy with
>single inheritance where what you call COMPARABLE is probably 
>some cousin of the Smalltalk class Magnitude.  Magnitude captures 

Sounds right.

>the semantics of comparison, and subclasses of Magnitude captures 
>the various numeric characteristics as well other characteristics 
>such as Character.

So where does COMPLEX go in this hierarchy?

>
>
>
Hope this helps,
-- Jim



-- 

*------------------------------------------------------------------------------*
Jim McKim  (203)-548-2458     Co-editor of Eiffel Outlook 
Internet:  jcm@hgc.edu        Subscribe early and often!
