Note:
In some similar languages, multiple inheritance is restricted in various ways to keep the language simple, such as by allowing inheritance from only one real class and a number of "interfaces", or by completely disallowing multiple inheritance. C++ places the full power of multiple inheritance in the hands of programmers, but it is needed only rarely, and (as with most techniques) can complicate code if used inappropriately. Because of C++'s approach to multiple inheritance, C++ has no need of separate language facilities for special language constructs that are usually called "interfaces", "traits" or "mixins" in other Object-Oriented languages, because C++'s classes themselves already provide this functionality.
|