CSC/ECE 517 Fall 2011/ch4 4a ga: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 10: | Line 10: | ||
===Practical Examples=== | ===Practical Examples=== | ||
====Twitter Module==== | ====Twitter Module==== | ||
====Active::Concern==== | |||
====Singleton Pattern==== | ====Singleton Pattern==== | ||
==Extend in other languages== | ==Extend in other languages== | ||
==Conclusion== | ==Conclusion== |
Revision as of 22:16, 16 October 2011
Introduction
This article discusses the extend concept as illustrated by Ruby's extend method. We provide a definition of extend, compare it to the include method, and go over the differences between extending a class and extending an object. We then consider two practical examples of Ruby's extend method.
From there, we go on to discuss how other languages provide functionality similar to that of Ruby's extend method. We also compare these implementations to the Ruby implementation as to whether they are more or less powerful than Ruby's. Finally, we also consider prototype-based languages such as Self, which don't even provide classes.