Path: utzoo!attcan!uunet!samsung!sdd.hp.com!ucsd!helios.ee.lbl.gov!ux1.lbl.gov!beard From: beard@ux1.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.programmer Subject: Re: Multiple Inheritance -- Is It A Luxury? Message-ID: <6133@helios.ee.lbl.gov> Date: 7 Jul 90 20:22:19 GMT References: <15132@reed.UUCP> <268BA8DC.4CD4@intercon.com> <8937@goofy.Apple.COM> <268C032E.5137@intercon.com> <1990Jul2.181147.1672@efi.com> <8967@goofy.Apple.COM> <42616@apple.Apple.COM> <2691908E.738C@intercon.com> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux1.lbl.gov (Patrick C Beard) Organization: Berkeley Systems, Inc. Lines: 38 X-Local-Date: 7 Jul 90 13:22:19 PDT In article <2691908E.738C@intercon.com> amanda@mermaid.intercon.com (Amanda Walker) writes: #In article <42616@apple.Apple.COM>, lins@Apple.COM (Chuck Lins) writes: #> If people go ga-ga over MI the way they have so #> far with objects, we'll end up with "spagetti-objects" even worse than the #> spagetti code produced using GOTO. # #There are times when multiple inheritance can be used to produce very elegant #code. However, object-oriented programming doesn't enforce disciplined #programming any more than anything else. Used properly, multiple inheritance #can be very useful in decomposing problems over orthgonal axes (for example, #take a look at the "mixin" concept in several Lisp object platforms). Used #improperly, you can end up with the "it's a floor wax AND a dessert topping" #effect... # #It all depends on the programmer. This is the most relevant comment that has been made so far. Just like power tools that carpenters use, Multiple Inheritance isn't something to be used casually. You really do have to know what you are doing. I would say that most programmers aren't at the level of expertise in object programming to know what to do with MI. I know I'm not there yet. But when I reach that level, I know that I want the option to try it out. The biggest problem with books on C++ and books on object programming in general, is that there aren't any clear-cut examples that show the perfect application of MI. So it's kind of a solution waiting for a problem. Just as with object programming vs. procedural programming, it's a good idea to use the right tool for the right job. By the way, has anyone read Meyer's book on Eiffel? Eiffel has been touted (by him and others) as having the cleanest implementation of MI of any language so far. I would hope somebody is working on an implementation for the Macintosh. ------------------------------------------------------------------------------- - Patrick Beard, Macintosh Programmer (beard@lbl.gov) - - Berkeley Systems, Inc. "..............Good day!" - Paul Harvey - -------------------------------------------------------------------------------