Newsgroups: comp.object,comp.lang.smalltalk,comp.lang.ada
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!uwm.edu!rutgers!psinntp!psinntp!psinntp!psinntp!merlin.hgc.edu!jcm
From: jcm@hgc.edu (James McKim)
Subject: Re: Has C++ had its day?
Message-ID: <1995Jul3.143029.23983@merlin.hgc.edu>
Sender: usenet@merlin.hgc.edu (Action News Central)
Organization: The Hartford Graduate Center
References: <3ssjch$61o@steel.interlog.com> <3sv01g$rsu@ornews.intel.com> <dewar.804646227@gnat>
Date: Mon, 3 Jul 1995 14:30:29 GMT
Lines: 32
Xref: glinda.oz.cs.cmu.edu comp.object:34177 comp.lang.smalltalk:25376 comp.lang.ada:32035

In article <dewar.804646227@gnat> dewar@cs.nyu.edu (Robert Dewar) writes:
>": MI is one of those things where when you really need it,
>: you need it badly and nothing else will do."
>
>during the Ada 95 design process, we often ran into this claim, or variations
>on it, but we did not manage to run into actual programs that demonstrated
>its validity!
>

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?

BTW, we are talking design, not implementation. Every Eiffel vendor adheres
to the above design, but actually implements Reals and Integers very 
efficiently. See Steve Tynor's post in a related thread.

Hope this helps,
-- Jim



-- 

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