is Missing multiple inheritance in sqeak a drawback ?
jacaetevha at fast-mail.org
Fri Oct 11 19:41:21 UTC 2002
IMHO, inheritance is quickly becoming _near_ to obsolete (not totally
obsolete, just near to it). For years it was the rage, but it seems to
me that good OO design really should emphasize the HAS-A relationship,
not the IS-A.
I have seen a lot of systems with an overabundance of inheritance, and
all it has done is make the system harder to understand and maintain,
and the bugs harder to track down. When I see a system that uses MI or
a great deal of inheritance in general, it speaks to me of a refactoring
opportunity. (In fact, I can't remember the last time that I saw a good
use of MI.) When those C++ guys bring it up, I would question them on
their overall design goals. MI is really just an escape route.
However, what I do like is the concept of an interface -- a promise to
answer certain questions. If I look at myself as an object in an OO
system, I would see a Person who is a Father, a Husband, an Employee, a
Son, etc. That may speak of MI. But, I rather like to look at it as 'I
answer certain questions per the role I am currently playing'. This is
accomplished through the contracts of the interfaces, and perhaps (in
implementation) as adaptors on Person.
Sorry for spouting so much.
[:question | ^One]
> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On
> Behalf Of Karl Ramberg
> Sent: Friday, October 11, 2002 3:24 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Re: is Missing multiple inheritance in sqeak a drawback ?
> Hans Beck wrote:
> > Hi,
> > I'm using squeak for prototyping our LCD measurement
> system software.
> > From time to time, some colleagues look at my display and are
> > astonished ;-)) But they are c++ freaks, and if we
> discuss about the
> > usability of squeak for prototyping, always there comes
> the argument
> > of lacking multiple inheritance.
> > So because I'm not a theoretican for computer languages
> but I suppose
> > there are a lot very good guys on this list, I would ask the
> > community, how far multiple inheritance is really
> needed, or is it bad
> > or what ever ? (Looking from a more or less theoretical
> viewpoint of
> > object oriented concepts ) ?
> Take a look at this:
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.384 / Virus Database: 216 - Release Date: 8/21/2002
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.384 / Virus Database: 216 - Release Date: 8/21/2002
More information about the Squeak-dev