Diamond Problem

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: The diamond problem is the name for the ambiguity which can arise when implementing a system using Multiple Inheritance. It is best illustrated with an example: [[Image:DiamondProblem...)
 
m (Reverted edits by Ebybymic (Talk); changed back to last version by Benjamin Kearns)
 
(One intermediate revision by one user not shown)

Latest revision as of 03:08, 25 November 2010

The diamond problem is the name for the ambiguity which can arise when implementing a system using Multiple Inheritance. It is best illustrated with an example: DiamondProblem.png

In this example, the Penguin class does not override the Move() method, and so it is left for the language to decide how the penguin should move.

Various languages handle this in different ways and almost every language handles the problem in a different way. Todo: List common languages supporting multiple inheritance and how they handle the problem.

Personal tools