Message-ID: <324B0CEE.16DE@mail.amsinc.com>
Date: Thu, 26 Sep 1996 16:08:30 -0700
From: Tom Hawker <tom_hawker@mail.amsinc.com>
Organization: AMS, Incorporated
X-Mailer: Mozilla 2.02 (Win16; I)
MIME-Version: 1.0
Newsgroups: comp.lang.smalltalk
Subject: Re: Multi. Inherit. in Smalltalk??
References: <52ebav$ddo@bcarh8ab.bnr.ca>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: thawker.amsinc.com
Lines: 29
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!news.mathworks.com!uunet!in3.uu.net!dns.amsinc.com!

Ken Chan wrote:
> 
> Hi all,
> 
>  I am a newbie to smalltalk. I am reading a book
> on smalltalk wich describes very little about
> multiple inheritance in SmallTalk. It sounds
> like MI is really in experimental stage for
> Smalltalk.
> 
>  Then, If I want to do MI (multi. inhert.),
> how do I do that?
> 
>  If Smalltalk does not support MI, then
> is there a way I can "fake" it with single
> inheritance?

The early versions of ParcPlace's Smalltalk-80 (which has since transmogrified
itself several times and is called "VisualWorks 2.5") used to support multiple
inheritance.  As far as I can tell, no one really used it, and it was a pain to
get working correctly.  I know of no efforts that plan on resurrecting it.

There is no immediate way to achieve multiple inheritance - that is, methods +
behavior are inherited from multiple branches in the hierarchy.  You can mimic
it by copying the methods you want or including subordinate objects that them-
selves perform some of the behavior (like collections), where you implement a
set of methods that simply defer to the embedded objects.

Perhaps others have better ideas.  I've not really found any.  What I've seen,
however, is that cases where you really need MI are very, very rare.  Choosing
a slightly different object model quite often clears up needs for MI.

Tom Hawker
