Kicking Ruby's Tyres

Ruby's one of the newer darlings of the fashionable development world. It's not really mainstream and doesn't currently have the kind of ubiquitous availability of languages like Perl and PHP or the commercial favour of Java and C++. That said, there's enough noise being made about it to at least have a look... so I did.

There's a getting started in 20 minutes introduction to Ruby linked from the main ruby site (www.ruby-lang.org) which, while simple, seems to capture the essence of the language. I'm a big fan of OOP (perhaps a bit too much for the tastes of some PHP developers) so the object oriented nature of Ruby feels very comfortable to me. As I'm so accustomed to the C-like syntax of my more regular tools: PHP, Java, C++ and Perl, I was initially a little apprehensive of the syntax as it looked, at first glance, very much like VBScript, AppleScript or bash - 3 languages I really don't get on with particularly well. After following the getting started guide, however, I found it was actually pretty comfortable.

So what's it good for? While I don't see myself using Ruby on Rails (the fashionable web application framework which seems to be particularly fashionable in the Web2.0 community) any time soon; I do see Ruby as an excellent replacement for Perl when it comes to CGI scripting as the object oriented nature of the language will make larger scripts much more manageable. I also see it as a possible replacement for AppleScript (I like the idea but don't get on quite so well with the language) on the rare occasion I use it and for occasional shell scripting purposes on our Linux dev server. I might also take a look at the Ruby/Cocoa bindings for fun but I don't see it being a commercial replacement for the cross-platform Java which we currently use.

Overall - I'm pretty impressed with Ruby and I can see why there's been a lot of interest in it. It'll probably be a while before it has any direct commercial value for us but I can definitely see it being useful as a kind of glue script almost straight away.

Update: It would seem that Ruby (as of version 1.8) now comes with the TK GUI toolkit by default. Further investigation may be required...