From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 2 Jan 92 19:45:07 GMT From: borland.com!pete@decwrl.dec.com (Pete Becker) Subject: Re: Multiple Inheritance Message-ID: <1992Jan2.194507.3074@borland.com> List-Id: In article <4969@charon.cwi.nl> guido@cwi.nl (Guido van Rossum) writes: >bs@alice.att.com (Bjarne Stroustrup) writes: > >>MI in C++ and elsewhere isn't perfect and it isn't a panacea, but it works >>and it makes some styles of programming noticeably more convenient and >>less obscure. Naturally, it can also be overused and misused, but basically >>it works. > >Point taken. However, I still worry about MI. When MI is *not* used, >it still imposes an overhead -- there is a "delta" offset in the vtbl >that is added to "this" each time a virtual function is called, but >this delta can only ever be nonzero when MI is used. I feel that this >is in direct conflict with the C++ philosophy that language features >you don't use shouldn't cause overhead. > That's an implementation issue, not a problem in the language definition. Those of us who have the luxury of being able to compile to native code rather than C can easily avoid this problem. Which is to say, with our compiler, there is no MI-related overhead in any class that does not use multiple inheritance. -- Pete