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: 30 Dec 91 20:10:51 GMT From: odi!dlw@uunet.uu.net (Dan Weinreb) Subject: Re: Multiple Inheritance in Ada 9X Message-ID: <1991Dec30.201051.23038@odi.com> List-Id: In article <1991Dec29.001511.8007objsys@netcom.COM> objsys@netcom.COM (Object S ystems) writes: I must have missed this one, could you please give a pointer or summarize why CLOS's MI is more powerful? I think Barry summarized the important points pretty well. The main thing I think matters the most is that "mixin" classes can be established in a library, and then users of the library can draw upon them and use them together in whatever pattern in appropriate. This is harder or impossible to do in C++ and most non-CLOS-like approaches that I am aware of. After deciphering the semantic mess of how method selection is performed in CLOS, its not surprising people are scared of MI. It seems to me they made a semantic rule mountain out of a little mole hill. As I recall the rules are obscure (linearized) and had non-intuitive special cases. This is exactly what I mean about language theorists. In fact, it's not a "semantic mess". It's well defined, and in real-life circumstances it's simple and natural. Many programmers who I worked with, including me, used this stuff (actually its predecessor, Flavors; CLOS is actually an improvement) every day, for years, producing many, many thousands of lines of code, with no problem. If you are a language theorist, and you work hard at it, you can construct cases in which CLOS's behavior regarding the ordering of the CPL is sometimes counterintuitive. This kind of thing is rare in practice. It's important to theoreticians, but for real programmers it makes no difference. The hue and cry that has been raised about this is completely unjustified from the point of view of getting the job done. Maybe you're the kind of person who never uses a hammer under any circumstances because it is possible for the hammer head to fly off and cause damage, and so you're waiting for the Perfect Hammer. But there are plenty of CLOS programmers who find it to be a very useful tool, and they'll happily use it until a better one comes along.