[Mono-list] C++ compatible CLR?
Fergus Henderson
fjh@cs.mu.oz.au
Thu, 19 Dec 2002 02:44:44 +1100
On 18-Dec-2002, Philippe Lavoie <philippe.lavoie@cactus.ca> wrote:
>
> There is one place where multiple-inheritance is a clear winner: when
> reusing someone else's code...
Using inheritence to reuse code which was not explicitly designed to be
inherited from is asking for trouble, IMHO. For example, it's easy
to accidentally get undefined behaviour in C++ if the base class doesn't
have a virtual distructor, and you delete a derived class object via a
pointer to the base class. You also need to be very careful to avoid
accidental object slicing.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.