Newsgroups: comp.lang.smalltalk,comp.object
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!uunet!rcm!rmartin
From: rmartin@rcmcon.com (Robert Martin)
Subject: Re: [Q] Multiple Inheritance
References: <JKVG.95Jan29195005@kamet.ccs.neu.edu>
Organization: R. C. M. Consulting Inc. 708-918-1004
Date: Mon, 30 Jan 1995 23:48:20 GMT
Message-ID: <1995Jan30.234820.5752@rcmcon.com>
Lines: 27
Xref: glinda.oz.cs.cmu.edu comp.lang.smalltalk:20077 comp.object:25833

jkvg@kamet.ccs.neu.edu (Jagadeesh Krishnamurthy Venugopal) writes:


>I have heard people that program in other OO languages (read C++ programmers)
>as saying that one of the major drawbacks of smalltalk as being the fact that
>it does not support multiple inheritance.

>Since I am but a beginning student in OO theory, I'd be extremely grateful if
>someone could tell me why multiple inheritance is needed, how if at all it's
>absence in Smalltalk might be a disadvantage for the programmer, and any
>techniques that might be used to either simulate multiple inheritance or work
>around it's absence.

In Smalltalk, the need for MI is not great because the language is
dynamically typed.  If you need an object to respond to the interfaces
that are present in other classes, you simply add those interfaces to
the class of that object.  In C++, MI is very important because the
typing is static.  In a statically typed language, the only way to
allow an object to repond to the methods of several other classes is
to inherit the interfaces for those methods from the abstract base
classes that define them.

-- 
Robert Martin       | Design Consulting   | Training courses offered:
Object Mentor Assoc.| rmartin@rcmcon.com  |   Object Oriented Analysis
2080 Cranbrook Rd.  | Tel: (708) 918-1004 |   Object Oriented Design
Green Oaks IL 60048 | Fax: (708) 918-1023 |   C++
