Diamond Problem
From CSSEMediaWiki
Revision as of 08:52, 2 August 2009 by Benjamin Kearns (Talk | contribs)
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:
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.