General information
Category:
Object Oriented Programming
>VFP is more OOP than VB, but it does not support multiple inheritance natively. The issue of multiple inheritance is one the OOP community is still debating, many folks say that if you require multiple inheritance your design is flawed.
The use of multiple inheritance does not mean that the design is flawed. MI has powerful applications and, for specific problems, it can be the best or only solution.
The statement that a design based on MI is flawed comes mainly form C++ solutions based on MI. But, C++ provides class templates, which are usually an alternative and better approach than MI. So, in C++'s context, a design based on MI may be somehow "wrong" because a design based on templates could be better. Do not extend the statement to languages other than C++.
One of the most interesting applications of MI is for specialized class frameworks based on one or more third party class frameworks. Usually, when the base framework(s) cannot be modified, multiple derivation may be a very good solution.
Vlad
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only