This article is from the FAQ, by with numerous contributions by others.
[Ole Lehrmann Madsen (olm@daimi.aau.dk) writes:]
I shall try to explain why there is no (traditional) multiple inheritance in
BETA. Please note that I am not trying to argue against MI. The following is
only an attempt to explain why it is not in BETA.
When BETA was designed we did not think that the concept of multiple
inheritance was ready for being incorporated in the language. One of the
main design goals for BETA was that it should be good for modelling. Most
usages of MI seemed to be for pure code reuse, i.e. a new class may be
defined by inheriting from a number of classes and then redefining the parts
that should differ. Often this is done without there being any conceptual
relation between the new class and the ones it inherits from. We did not
like that way of using inheritance.
MI in BETA should be there to model classification hierarchies which are
non-tree structured. In my experience, such hierarchies are rare in
practice. What is more common is that you may want several independent
tree-structured classification hierarchies for the same objects. A set of
person objects might be classified according to their profession,
nationality, and religion. This gives three class-hierarchies. People often
handle such situation using MI, but this will merge the hierarchies in a way
that makes it difficult to identify the three original ones.
We would like to support such independent classification hierarchies in
BETA, but no concrete proposal exists.
The various proposals for solving name conflicts and overlapping
superclasses also seemed rather complex. We did not want the semantics of
basic constructs to be complicated to understand.
For BETA there are a number of additional problems:
* Virtual patterns from a common superclass may have conflicting bindings
in the superclasses:
A: (# V:< A1; ... do ... inner ... #);
B: A(# V::< A2; ... do ... inner ... #);
C: A(# V::< A3; ... do ... inner ... #);
D: B & C (# V:: A4; ... do ... #);
A: (# f:< ... #);
B: (# g:< ... #);
C: (# ...
X: @A(# f::< (# ... #); ... #);
Y: @B(# g::< (# ... #); ... #);
...
#);
Window
/ \
WindowWithBorder WindowWithTitle
\ /
WindowWithBorderAndTitle
Window:
(# ...
Border: (# ... #);
Title: (# ... #);
#);
W1: @Window(# B: @Border; T: @Title #);
W2: @Window(# T1,T2: @Title #);
 
Continue to: