Reason 3: Ruby is better than Java
Mixins.
I've become very accustomed to using lots and lots of Composition in the Javaworld. Spending an Object's inheritance isn't anything to trifle over, afterall.
Ruby mixins allow for a sort of pseudo-multiple-inheritance, where you can add implementations to classes without having to subclass. You can even add the mixin functionality into existing (core) classes like Array.
Score 1 for Ruby!
Subscribe to:
Post Comments (Atom)
1 comment:
Really great work...
tanks for sharing this....
___________________
Melvin
Call Today for NEXT DAY Instellation to watch your Favorite Channels on HD reciever.
Post a Comment