Path: news.daimi.aau.dk!news.uni-c.dk!sunic!pipex!howland.reston.ans.net!EU.net!Germany.EU.net!ascom.de!Aachen.Germany.EU.net!rmi.de!sun2.cadis.de!ipx3.cadis.de!not-for-mail From: graulich@cadis.de (Robert Graulich) Newsgroups: comp.lang.beta,comp.lang.eiffel,comp.object Subject: Re: On why BETA does not have multiple inheritance Date: 22 Sep 1994 12:33:57 +0200 Organization: Cadis GmbH Lines: 45 Message-ID: <35rmil$le7@ipx3.cadis.de> References: <358nrv$bpf@engnews2.Eng.Sun.COM> <35jb33$3q1@engnews2.Eng.Sun.COM> NNTP-Posting-Host: ipx3.cadis.de Xref: news.daimi.aau.dk comp.lang.beta:101 comp.lang.eiffel:6229 comp.object:19511 olm@Eng.Sun.COM (Ole Lehrmann Madsen) writes: >derway@ndc.com (D. Erway) writes: ... >> Ole> As a final example, consider the following well-know MI case: >> Ole> Window >> Ole> / \ >> Ole> WindowWitBorder WindowWithTitle >> Ole> \ / >> Ole> WindowWithTitleAndBorder Hi! Please excuse me intruding your discussion, but I want to point out the following. With inheritance you express the relationship "A is B" (in C++ class A : public B {}). But in this example you want to model WindowWithTitleAndBorder HAS WindowWithBorder and WindowWithTitle or even better WindowWithTitleAndBorder HAS Border and Title. But you say that WindowWithTitleAndBorder IS WWB and WWT. Thats not true. When a class wants to HAVE something, this should be layered. (in C++: class WindowWithTitleAndBorder { Border b; Title t; };) What do you think about this? I think using MI at the right point is good, but this is the situation, which can nobody predict. (Because in C++ you must say if a base class is virtual or not. But a library designer cannot predict it all. So why using MI where it is no needed???) Greetings, Robert Graulich