Posted: Aug 12, 2010 10:31 pm
by Calilasseia
Oh, and one idea that has led to a lot of trouble in C++ is allowing child objects to inherit from multiple parents. This has been a source of numerous insidious and troublesome bugs in some large projects. The people responsible for Java specifically forbade multiple inheritance within the Java language because of it.

Within C++, it's possible to define two objects, have them both share a name for a method, then define a third object that inherits from these two, at which point, you have the less than happy scenario of deciding which of the identically named methods from which of the parents is going to be overridden in the child object. Worse still, because of the flexibility of method overloading, I've been told it's possible to have the child object refer to overridden versions of both of the parent methods via the same method label ... which again, drives a sodding tank battalion through the OOP paradigm.

Needless to say, I wouldn't trust a mission critical application to this language platform unless there were very strict rules in place as to what programmers could and couldn't do.