01 April 2014

Functionality vs. Fastness

A question that language developers have faced for a long time is whether or not to make their language the "does-it-all" or the "does-it-fast" of languages.

On one end of the spectrum are the low-level languages. Think C/C++--the ones with low functionality and high fastness. On the other end is all of the "bloated" languages. Think PHP, Java 6--the ones with high functionality and low fastness. I often find myself swapping between languages on both ends of this spectrum. Up until recently, there hasn't really been a language I've known of that treats the world with both sides of the picture: high functionality and high fastness.

Enter Ruby. Ruby calls itself "a programmer's best friend" for a very good reason. It's insanely functional (one can write a web server gem, odd as it may look, in 6 lines of Ruby code), and also insanely fast. It powers many of the world's famous social networks, and for good reason.

For me, Ruby makes the most sense. Everything I want to do can be done in Ruby in some way. Writing a module to use in other projects is very easy, and then sharing it with the world is even easier. It's the kind of language that encourages expansion; over 71,000 "gems" have been published. From things like cryptography to things like the well-known Rails framework, Ruby plays across the entire gamut.

Things like classes and such are hard to find in the "fast" languages, but come naturally in the "functional" languages. Ruby is what many call "purely" object-oriented; practically everything is represented as an object, and some interesting things come of this behavior. Some projects can be written containing extensions of existing objects, and some major things can be done using one-line changes.

Sure there's still a trade-off between functionality when one uses Ruby (it isn't as fast as some of its counterparts, but it's fast and getting faster), but it's still got much of the "best of both worlds" effect going on.

I'd suggest that you try Ruby if you haven't already. It's interesting to see what has been done and what will continue to happen. Read more, if you're interested. I think it's the perfect combination of both functionality and speed, and is built sanely.

No comments:

Post a Comment