Use of Multiple Inheritance (MI) | Languages that use/support | How to accomplish in Ada |
Gain visibility to a "module" | Eiffel | with and "use" or "use type" clause |
Is-implemented-using relationship | C++ and Eiffel | Tagged types with private extensions and record composition |
Mix-in MI | C++ and Eiffel | |
Mix-in provides components and operations and overriding operations need only look at mix-in components | C++ and Eiffel | Tagged type and private extensions |
Mix-in provides components and operations and overriding operations need access to entire new object | C++ and Eiffel | Generic packages with generic tagged type formal parameters which inherit and re-export |
Case two plus mix-in object must be able to be put in list with other mix-in objects | C++ and Eiffel | Access discriminants on tagged types. Generics may also be used |
Based on “Multiple Inheritance in Ada 95” by Tucker Taft
Previous slide | Contents | Next slide |
From the Script: Slide 22 - Multiple Inheritance
As demonstrated on this page, Ada 95 provides indirect support for using common forms of Multiple Inheritance available in two popular object-oriented languages. Although some may consider these implementations more tedious than the methods available in other languages, the approach taken ensures consistency and upward compatibility. At the same time, the look, feel and reliability aspects of Ada 83, including strong typing, are upheld.