Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!apple.com!casseres From: casseres@apple.com (David Casseres) Newsgroups: comp.sys.mac.programmer Subject: Re: Multiple Inheritance -- Is It A Luxury? Message-ID: <8967@goofy.Apple.COM> Date: 3 Jul 90 17:55:59 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 36 References:<15132@reed.UUCP> <268BA8DC.4CD4@intercon.com> <8937@goofy.Apple.COM> <268C032E.5137@intercon.com> <1990Jul2.181147.1672@efi.com> In article <1990Jul2.181147.1672@efi.com> tim@efi.com (Tim Maroney) writes: > The people doing the MPW compilers seem to think that multiple > inheritance is not important. It's not possible at all in Object > Pascal, and apparently is impossible to use in real (handle-based) > applications in C++. I think this is a cavalier attitude. One clarification and two comments. The clarification: C++ on the Mac does not allow multiple inheritance for subclasses of THandleObject; but it can be used with all other classes. It doesn't matter whether the application uses THandleObject subclasses in addition. Note that it is not necessary for everything to be handle-based. First comment: The restriction on THandleObject subclasses and multiple inheritance is due to serious implementation difficulties that have been explained in this group, not to a cavalier attitude. Second comment: There is some justification for a cavalier attitude about multiple inheritance, just as there is justification for wanting it very badly in some cases. Brian Bechtel sums it up very well in saying "Multiple inheritance is the GOTO of the 1990's." It is tremendously powerful, lets you do any damn thing you like, elegantly solves certain problems, leads to utterly obscure code, and invites massive abuse that can cause enormous damage to the integrity of code. In my own limited experience with C++, I have found that a redesign of the hierarchy always leads to cleaner, more elegant code than multiple inheritance. But then, I'm not using a hierarchy containing a lot of libraries produced by other people. If I were, I might want to use a lot of multiple inheritance; but on the other hand, I think that in that situation what I would *really* want is source code for all the libraries so I could re-implement them to suit my purposes! That, not any lack of features, is the problem with any OOPS that gives you only compiled libraries instead of source code. David Casseres Exclaimer: Hey!