Monday, May 26, 2008

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!

1 comment:

Anonymous said...

Really great work...
tanks for sharing this....


___________________
Melvin
Call Today for NEXT DAY Instellation to watch your Favorite Channels on HD reciever.