I just translated an old PHP function to its Ruby counterpart. I think it really showcases Ruby’s elegance:
PHP Version:
Ruby Version:
I just translated an old PHP function to its Ruby counterpart. I think it really showcases Ruby’s elegance:
PHP Version:
Ruby Version:
Use this link to trackback from your own site.
Pretty cool, indeed. Thanks for sharing. I’m in the process of deciding which dynamically-typed programming language I’m going to learn next, and your constant praise of Ruby definitely makes me increasingly curious. Being a Java developer, I’m obviously considering Groovy [groovy.codehaus.org/], but also Python and Ruby.
Haven’t tried Groovy yet, but I’ve done both Java and Python in the past. All three have their strong points, but Ruby makes me remember why I like programming. It gives me powerful, elegant tools and then steps to the side, allowing me to do what I needs to get done.