Newsgroups: comp.object,comp.lang.smalltalk,comp.lang.ada
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!howland.reston.ans.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!godot.cc.duq.edu!newsfeed.pitt.edu!dbisna.com!psinntp!psinntp!psinntp!psinntp!merlin.hgc.edu!jcm
From: jcm@hgc.edu (James McKim)
Subject: Re: Has C++ had its day?
Message-ID: <1995Jul5.133218.9910@merlin.hgc.edu>
Sender: usenet@merlin.hgc.edu (Action News Central)
Organization: The Hartford Graduate Center
References: <dewar.804646227@hgc.edu> <3t9tdq$kef@gensym1.gensym.com>
Date: Wed, 5 Jul 1995 13:32:18 GMT
Lines: 55
Xref: glinda.oz.cs.cmu.edu comp.object:34358 comp.lang.smalltalk:25482 comp.lang.ada:32125

In article <3t9tdq$kef@gensym1.gensym.com> jsa@gensym.com () writes:
>
>
>
>Jim McKim writes:
>
>>Once you get used to using MI in a disciplined fashion (I use it for subtyping)
>>examples seem to crop up everywhere. Here's a quite convincing one, I think,
>>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?
>
>Isn't this a case of mixins?  And we all know that MI isn't necessary for that.

Sigh. No, MI isn't necessary. Nor is SI. Nor are objects, classes, types, etc.
Whether mixins are involved (and I'm not sure I've ever seen a good, rigorous
definition of that term - what is the difference between a mixin and an abstract
class?) is irrelevant. The relationships I've stated are clearly correct, 
so please show me a nice clean way to implement those relationships without
MI. Of course the usual pollymorphic substitutions should still work. That is,
I should be able to use a REAL anywhere a NUMERIC or a COMPARABLE is expected.

>
>Also, it seems more correct to think of things in "class X" as being comparable
>not that any instance x in X "isa" comparable

Well, I don't see a semantic difference between
  X is (adjective form of) Y
and
  X is a kind of (noun form of) Y.

But if the adjective names really bother you then use TOTALLY_ORDERED_SET
in place of COMPARABLE and MATHEMATICAL_RING in place of NUMERIC.


>                           (comparable to what?  comparable
>in the abstract?  what could that mean?)

Comparable to each other - reals to reals, integers to integers, strings to
strings, etc.

>
>/Jon


Hope this helps,
-- Jim
-- 

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