Avoid accidental multiple inheritance

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: ''Whenever there is inheritance in an object-oriented design ask yourself two questions: 1) Am I a special type of the thing I'm inheriting from? and 2) Is the thing I'm inheriting from pa...)
 
 
Line 1: Line 1:
''Whenever there is inheritance in an object-oriented design ask yourself two questions: 1) Am I a special type of the thing I'm inheriting from? and 2) Is the thing I'm inheriting from part of me?'' -- Riel's Heuristic 6.3, [[Arthur Riel 1996]]
+
''Whenever you have found a multiple inheritance relationship in a object-oriented design be sure that no base class is actually a derived class of another base class, i.e. accidental multiple inheritance.'' -- Riel's Heuristic 6.3, [[Arthur Riel 1996]]
  
 
== Explanation ==
 
== Explanation ==

Latest revision as of 22:20, 28 July 2009

Whenever you have found a multiple inheritance relationship in a object-oriented design be sure that no base class is actually a derived class of another base class, i.e. accidental multiple inheritance. -- Riel's Heuristic 6.3, Arthur Riel 1996

Explanation

See also

Personal tools