From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d85ddda7d974176 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.germany.com!newsfeed.utanet.at!newsfeed01.chello.at!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: MI Hownotto by Betrand Meyer Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1162043687.5674.10.camel@localhost.localdomain> Date: Sat, 28 Oct 2006 19:11:14 +0200 Message-ID: <1gg01bv89foip.16h83zektx82y.dlg@40tude.net> NNTP-Posting-Date: 28 Oct 2006 19:10:58 CEST NNTP-Posting-Host: 5b89f0c8.newsspool1.arcor-online.net X-Trace: DXC=lfRRS?bLBIR1`E>oC;JXEZic==]BZ:af^4Fo<]lROoRQ^YC2XCjHcbYPRRmU\80HXXDNcfSJ;bb[UIRnRBaCd On Sat, 28 Oct 2006 15:54:48 +0200, Georg Bauhaus wrote: > This week's EiffelWorld column by Bertrand Meyer has a note > about construction procedures and multiple inheritance. > I thought it might be interesting given a recent discussion > in c.l.ada. > > > In particular, multiple inheritance just doesn't go well with the > C++ idea, also retained in Java and C#, that a constructor (creation > procedure) must start its execution by calling the constructor of > its parent. As soon as you require this you are ruling out multiple > inheritance, since with two parents or more there's no good reason for > executing a particular parent's constructor before the others'; and > the situation becomes even more hazy when these parents have a common > ancestor -- repeated inheritance, the so called "diamond" structure. > Hence complicated rules that probably about twelve people in the world > understand, and fewer remember. Hmm, maybe the quote was taken out of context, but I don't really think that constructors are responsible "diamond." The issue, as I see it, is deeper. It is independent on constructors and, notably, even on whether implementation (like record members) or just interfaces are inherited. MI definitely adds complexity. In C++ it is quite difficult to deal with, and construction issues become catastrophic. But what were an alternative to MI? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de