Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!westmark!mole-end!mat From: mat@mole-end.UUCP (Mark A Terribile) Newsgroups: comp.lang.c++ Subject: Re: Bug in multiple inheritence Summary: Slicing: good for bread ... Message-ID: <475@mole-end.UUCP> Date: 3 Feb 91 06:55:45 GMT References: <1991Jan17.190452.5204@lia> <472@mole-end.UUCP> <70223@microsoft.UUCP> Organization: mole-end--private system. admin: mole-end!newtnews Lines: 23 > |It is also noted in the commentary that this `slicing' may seem dangerous, > |but that it is consistant with all the other rules of the language, and that > |protections against probably would give a false confidence. > Compiler writers would do well to issue a warning when "slicing" is > performed on objects with virtual functions. It *could be* that this > slicing is want the programmer wants. But the probability would seem > to be vanishingly small. I'm not so sure about that. One of the things I'm trying to come to grips with right now (actually, trying to write an essay on) is how classes that play different parts, that have different sorts of roles, can expect to use inheritance and virtualization differently, if at all. Certainly, some of the common examples (GUIs) used by those who teach Object Orientation can stand slicing. Many real-world problems cannot. But probably some can. Before we make such proclamations, I think we need to develop a set of concepts to describe the purposes to which are put inheritance and virtualization. -- (This man's opinions are his own.) From mole-end Mark Terribile