posted 7 years ago
Before there was a Java, I was one of the first would-be implementors of a C++ compiler. C++, of course, does implement true multiple inheritance.
To understand why the Java language definition doesn't do multiple inheritance, you have to understand the essential difference between a Java Class and a Java Interface.
Essentially, a Java Class defines the characteristics of a concrete object. While an Abstract class cannot itself be instantiated as a concrete object, it is assumed that abstract classes will serve as superclasses for concretely-instantiable objects. If there's any way to use an abstract class that doesn't at some point involve a concrete subclass, it doesn't occur to me at the moment.
Interfaces, on the other hand, are never instantiated. An Interface isn't so much a definition as it is a contract. When a class says that it implements an Interface, then what it's really promising is that for each method defined in the interface, there will be a corresponding method implementation in the class. Since an interface definition is a promise, rather than a model, having a class implement two or more interfaces which contain methods whose signatures are identical is not a problem, since all that has been done is a repetition of the promise of that method.
On the other hand, in a true multiple inheritance system, where class C inherits from both class A and class B, a reference to public method "foo" is ambiguous if both classes implement a member names foo. And in C++, the deductive mechanisms (at least originally) would have been able to determine which "foo" you meant even if they were of non-intersecting types (for example an "int foo" and a "class *foo"). And it's even messier when methods/functions are involved. You no longer have a simple and abstract way of referencing class methods if the same method signature is published for 2 different classes, you have to explicitly disambiguate them. Which loses you not only abstraction itself, but the primary benefits of abstraction, such as "black box" operation and relative immunity in the class-using code to changes in the class definitions.
And speaking from experience, multiple inheritance of classes is a right royal pain. Between that and the fact that C++ started with a pretty fuzzy disambiguation mechanism to begin with, I ended up abandoning my hopes of implementing a C++ compiler of my own.
The problem with getting rid of the "undesirables" is that sooner or later someone will decide that YOU are an undesirable.