Newsgroups: comp.lang.smalltalk,comp.lang.c++,comp.lang.java,comp.object
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!news.mathworks.com!zombie.ncsc.mil!newsgate.duke.edu!news.eff.org!sed.psrw.com!psinntp	!psinntp!psinntp!psinntp!merlin.hgc.edu!jcm
From: jcm@hgc.edu (James McKim)
Subject: Re: Dynamic vs. static type checking
Message-ID: <1996Jul19.173101.13209@merlin.hgc.edu>
Sender: usenet@merlin.hgc.edu (Action News Central)
Organization: The Hartford Graduate Center
References: <4saq9u$k3s@epx.cis.umn.edu> <31EA0843.E4@iitb. <rmartin-1807960949390001@vh1b-039.wwa.com>
Date: Fri, 19 Jul 1996 17:31:01 GMT
Lines: 64
Xref: glinda.oz.cs.cmu.edu comp.lang.smalltalk:41040 comp.lang.c++:201116 comp.lang.java:69776 comp.object:52352

In article <rmartin-1807960949390001@vh1b-039.wwa.com> rmartin@oma.com (Robert C. Martin) writes:
>> In <4sj3rk$h13@newsserver.rrzn.uni-hannover.de>,
>olbrich@bauinf30erib.uni-hannover.de (Markus Olbrich) writes:
>> >In article <rmartin-1707960911160001@vh1-024.wwa.com>, rmartin@oma.com
>(Robert C. Martin) writes: 
>> >
>> >> MI is never to be feared.  It is only to be used.
>> >
>> >
>> >But how do you tell your students what special aspects they must remember
>> >each time they use MI. What i mean is for example the need to initialize
>> >explicitly each base class of a multiply inherited special class.
>
>How do you tell them?  You tell them.
>
>The rules aren't that difficult.  You initialize multiple base classes
>*exactly* the same way you initialize single base classes; and you initialize
>any virtual base classes explicitly in all concrete derivatives.

In a thread on whether Multiple Inheritance is a good thing it's important
not to restrict oneself to a particular language. AFAIK, C++ is the _only_
language that has such initialization needs. In Eiffel, for simple
multiple inheritance, the _only_ "special aspect" the programmer must deal
with is the need to remove name clashes in the case two ancestors have the
same name for two different features. This is easily done by renaming those
features in the descendant and the compiler tells me about any
such problems I may have missed. I use MI whenever I think it's
an appropriate design decision and rarely have to think twice about how
to implement it at the language level. It's just not an issue.


[..]

>
>There are topics that are hard.  That doesn't mean that they can't be learned,
>it just means that it takes *work* to learn them.  Anyone who is not willing
>to put forth the effort shoudl probably reconsider their desire to become
>a software engineer.

There are indeed topics that are hard, but simple multiple inheritance is
not one of them. Repeated inheritance, the special case of MI in which
there are two or more distinct inheritance paths from a descendant to
an ancestor, is more of a challenge as there are more conceptual
issues than just renaming, but is still not a big problem and is relatively
rare, in any case.

>
>-- 
>Robert C. Martin    | Design Consulting   | Training courses offered:
>Object Mentor       | rmartin@oma.com     |   Object Oriented Design
>14619 N Somerset Cr | Tel: (847) 918-1004 |   C++
>Green Oaks IL 60048 | Fax: (847) 918-1023 | http://www.oma.com  
>
>"One of the great commandments of science is:
>    'Mistrust arguments from authority.'" -- Carl Sagan


Hope this helps,
-- Jim
-- 

*------------------------------------------------------------------------------*
Jim McKim  (860)-548-2458     Teachers affect eternity. They can never tell 
Internet:  jcm@hgc.edu        where their influence stops.
