CSC/ECE 517 Fall 2007/wiki1 7 c9: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Multiple | == Concept == | ||
'Multiple inheritance is a controversial concept. Detractors say it leads to messy class hierarchies, it is impossible to implement efficiently, and when the same method is inherited along two different paths, there is no good way to decide automatically which definition should be used. Do mixins solve all of these problems? Give (or cite) examples (e.g., Java, C++, and/or Ruby) to illustrate your conclusions. Are mixins a clear advance over interfaces? Do mixins have any disadvantages not shared by multiple inheritance or interfaces?' | |||
== References: == | == References: == | ||
Line 10: | Line 9: | ||
#[http://www.objectmentor.com/resources/articles/javacpp.pdf Deadly diamond of death by Robert Martin] | #[http://www.objectmentor.com/resources/articles/javacpp.pdf Deadly diamond of death by Robert Martin] | ||
#[http://giantrobots.thoughtbot.com/2007/9/5/ruby-modules-multiple-inheritance A very insightful article from thoughtbot] | #[http://giantrobots.thoughtbot.com/2007/9/5/ruby-modules-multiple-inheritance A very insightful article from thoughtbot] | ||
## | #[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Wiki entry on Ruby] | ||
#[http://www.deitel.com/articles/cplusplus_tutorials/20060225/virtualBaseClass The C++ code snipped has been adapted from this site] | |||
== See Also == | |||
#[http://www.oreillynet.com/ruby/blog/2007/01/digging_deep_mixing_it_up_or_i_1.html A very insightful article from O'reilly] | |||
#[http://www.recentrambles.com/pragmatic/view/69 One more blog on mixins, modules and inheritence] |
Revision as of 03:26, 14 September 2007
Concept
'Multiple inheritance is a controversial concept. Detractors say it leads to messy class hierarchies, it is impossible to implement efficiently, and when the same method is inherited along two different paths, there is no good way to decide automatically which definition should be used. Do mixins solve all of these problems? Give (or cite) examples (e.g., Java, C++, and/or Ruby) to illustrate your conclusions. Are mixins a clear advance over interfaces? Do mixins have any disadvantages not shared by multiple inheritance or interfaces?'
References:
- Programming Ruby: The programmatic programmer’s guide
- Deadly diamond of death by Robert Martin
- A very insightful article from thoughtbot
- Wiki entry on Ruby
- The C++ code snipped has been adapted from this site