Why is not multiple inheritance in most programming languages supported?
Can I really use this feature to develop different layout of application?
As a developer, multiple heritage is useful in many situations, but this greatly increases the complexity of the language , Which makes life hard for both compiler developers and programmers.
-
A problem occurs when two basic classes have a data group or a similar name method, it is difficult to resolve, which is being referred by the sub-class.
-
One more occurs when two basic classes are successors from the same base class, in which the "diamond" pattern creates succession hierarchy.
-
This is the order that it is necessary to specify the initialization / expansion of the basic classes - this can sometimes be due to changes in the order of inheritance changes - some surprising forms Catch the developers from
-
Some languages support the context of 'super' or equivalent, which shows an attribute of the base class for this object. It is difficult to support multi language in one language.
-
Some languages try to provide auto-object-relational models, so objects can be created with regular RDS. This mapping is difficult at the best time (it is described as "Vietnam War" of software development), but if multiple inheritance is supported, then it is more difficult.
Comments
Post a Comment