Multiple-Inheritance and Inheritance...Again!
In writing about inheritance in Mynx, an interesting point about C++ is that multiple disjoint inheritance is possible in C++ (but not Java or C#) but the language specification/compilers do not enforce or check for multiple disjoint inheritance. (It would be an interesting project to write a Perl/Python/Unix shell script to enforce, check for disjoint multiple inheritance.)
However C++ does have the mechanisms in the language to handle unrestricted multiple inheritance, which would be unnecessary if the programming language had multiple disjoint inheritance.
Inheritance is a powerful object-oriented paradigm feature, but can be abused and misused. In Java for example, it can be abused (and not just multiple-inheritance) creating the pseudo-type definition antipattern.
But, like a sharp knife, light saber, or phaser, a powerful feature can be abused, inheritance in software using object-oriented programming languages.
Inheritance is powerful, but it seems multiple inheritance is the square of the power of inheritance.
C++ has unrestricted multiple inheritance, Mynx multiple disjoint inheritance, and Java/C# single-inheritance...going from x^2 to x^c where c > 1, to x^1.
However C++ does have the mechanisms in the language to handle unrestricted multiple inheritance, which would be unnecessary if the programming language had multiple disjoint inheritance.
Inheritance is a powerful object-oriented paradigm feature, but can be abused and misused. In Java for example, it can be abused (and not just multiple-inheritance) creating the pseudo-type definition antipattern.
But, like a sharp knife, light saber, or phaser, a powerful feature can be abused, inheritance in software using object-oriented programming languages.
Inheritance is powerful, but it seems multiple inheritance is the square of the power of inheritance.
C++ has unrestricted multiple inheritance, Mynx multiple disjoint inheritance, and Java/C# single-inheritance...going from x^2 to x^c where c > 1, to x^1.
Labels: multiple disjoint inheritance, multiple inheritance, mynx


<< Home