Ruby, I (heart) You

My officemate at work has totally fallen in love. I would tell his wife, but since the object of his desire is a programming language, I doubt that she would be the least bit fazed. “I mean, it’s not the first time he’s had his little affaires de la langue,” she might say, dismissing his all-consuming passion. “It’s just a stupid scripting language. It can’t compete with me!”

Yes, my officemate has fallen totally in love with Ruby, the scripting language that’s often described as “kind of like Perl, except that everything’s an object”. If that description alone is not compelling enough to incite geek lust, some of the other features might be of interest. The thing that caught my eye is the fact that any object which can be represented as a collection (e.g. arrays, hashes, sets, etc.) can be iterated over with an anonymous block of code (see Blocks and Iterators here for more information). Also, like Perl, the language is extensible; there are tons of third-party modules available.

Right now, my officemate is prototyping a complex set of database operations using Ruby to model the code that he’ll eventually convert to C++. Since Ruby is object-oriented, his object model will translate nicely when he ports it. And since Ruby has a lot of functionality built right in, he’s able to get done with his prototype post haste.

So, the love affair is catching. I have to admit that I think that Ruby is kind of cute. Even though I think she would understand, you’d best not tell Michelle. It’s our secret.

Right?

Some references to whet your appetite:

2004.04.29 · permalink