From: Ole-Hjalmar Kristensen <oleh@vlinux.voxelvision.no>
Subject: Re: Sugestion to Multiple Inheritance
Date: Mon, 14 Jan 2002 16:27:26 GMT
Date: 2002-01-14T16:27:26+00:00 [thread overview]
Message-ID: <7vn0zg3nln.fsf@vlinux.voxelvision.no> (raw)
In-Reply-To: 3C42E418.8B8C694F@brighton.ac.uk
John English <je@brighton.ac.uk> writes:
> Hyman Rosen wrote:
> >
> > Richard Riehle wrote:
> > > Multiple inheritance is just one feature
> >
> > > I find, if not a disaster, at least, as you say, overly-complicated,
> > > and inconvenient.
> >
> > Actually, the complications are in the compiler, because of technical
> > aspects of how objects must behave during their construction. In use,
> > MI works for C++ users pretty much exactly as they expect.
>
> Unless you have a diamond-shaped hierarchy:
> A
> / \
> B C
> \ /
> D
> in which case you get into the nasty world of virtual base classes
> and the assorted surprises that they bring with them. Anyone who
> finds that MI works "pretty much exactly as they expect" in this
> situation has a better imagination than average, IMHO.
I have lots of diamond-shaped hierarchies in my code to implement mixins.
It *USUALLY* works as expected by me. Other readers of the code tend to be
confused. It is a nice idiom, but can be very confusing for people who have
not seen it before.
>
> -----------------------------------------------------------------
> John English | mailto:je@brighton.ac.uk
> Senior Lecturer | http://www.it.bton.ac.uk/staff/je
> Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS **
> University of Brighton | -- see http://burks.bton.ac.uk
> -----------------------------------------------------------------
next prev parent reply other threads:[~2002-01-14 16:27 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-11 10:20 Sugestion to Multiple Inheritance Lutz Donnerhacke
2002-01-11 17:21 ` Stephen Leake
2002-01-11 17:53 ` Lutz Donnerhacke
2002-01-11 19:57 ` Stephen Leake
2002-01-17 8:28 ` Lutz Donnerhacke
2002-01-17 14:31 ` Stephen Leake
2002-01-17 14:54 ` Lutz Donnerhacke
2002-01-17 20:52 ` Jim Rogers
2002-01-11 18:07 ` Mark Lundquist
2002-01-11 18:14 ` Richard Riehle
2002-01-11 20:56 ` Hyman Rosen
2002-01-12 7:35 ` Richard Riehle
2002-01-13 6:37 ` Hyman Rosen
2002-01-14 13:58 ` John English
2002-01-14 16:27 ` Ole-Hjalmar Kristensen [this message]
2002-01-12 2:09 ` Will
2002-01-11 22:04 ` Matthew Heaney
2002-01-15 15:32 ` Hyman Rosen
2002-01-15 16:03 ` Lutz Donnerhacke
2002-01-18 19:03 ` Matthew Heaney
2002-01-21 11:23 ` Lutz Donnerhacke
2002-01-21 16:43 ` Brian Rogoff
2002-01-21 17:00 ` Lutz Donnerhacke
2002-01-22 16:55 ` Brian Rogoff
2002-01-23 8:58 ` Dmitry A. Kazakov
2002-01-25 0:09 ` Brian Rogoff
2002-01-28 16:23 ` Dmitry A. Kazakov
2002-01-12 0:28 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox