On Fri, Feb 23, 2007 at 10:35:35PM -0800, Andreas Raab wrote:
Early on I thought the same way (and this was why we started thinking down that road when Nathanael interned with us). However, in practice it seems like Traits are mostly being used as a thinly veiled version of MI with all the same problems. You have correctly pointed out that Java interfaces are "nothing but abstract virtual base classes in C++" - which coincidentally, was the only way that MI ever worked in C++, which itself has two dozen ways of doing MI wrong and exactly ONE to do it right (abstract virtual base classes). Java choose a stand on that and it worked (which is pretty impressive given that it was the first language that used interface to that extent). Traits seem to reintroduce a number of ways of using MI wrongly (at least that's the feeling that I get when I look at the practical example) and that's why I prefer interfaces.
Forgive me, but I am not familiar with "All the problems Multiple Inheritance got wrong". I will be testing out how Multiple Inheritance works in Squeak, since I have made it my top priority to get ThingLab [1] working in a recent Squeak system. ThingLab adds multiple inheritance [2] and a constraint solver to Smalltalk, and both have at least a good theoretical reason to be there, but I cannot test the implementation yet, since such a change currently breaks squeak. Multiple Inheritance has at least a solid theory; I have not had much experience with an implementation.
[1] http://wiki.squeak.org/squeak/607 Links to ThingLab papers and code.
[2] http://www.2share.com/thinglab/ThingLab%20-%20Chapter%203.html Chapter 3 of the ThingLab paper. Section 2 contains a defense of ThingLab's multiple inheritance.