Fancy A Pint And A Ruby?
July 13, 2005

Tom Smith has been looking at Ruby, and having some hassle.

I spent one very superficial session of a few hours looking at it, and I mean to go back. I must admit though that Tom’s post chimed with my impressions, particularly the stuff about syntax:

As syntaxes go, it's not C... but I don't like having to add "end", I really don't like the pipe chars in "friends.each do |friend|", nor the "@" character in object variables, as much as adding ";" in other languages, they all become noise and just another niggly thing to forget or make reading and writing the code more effort. Oh and I've never liked "==" rather than "=". I think that I really want my own pidgeon Ruby that borrows from Python and HyperTalk.

Why is it that there’s always something nasty in a language that otherwise looks quite clean? I don’t agree with all of Tom’s specific gripes, but I can’t stand naming conventions that involve putting graphical characters at the beginning or end of words to distinguish their type. I don’t find it necessary, and to me it just adds visual noise and makes everything look messy. Even Dylan (which as most people know is as near as I’ve got to my perfect language) has a hideous and totally arbitrary naming convention which goes a long way towards spoiling a beautiful language.

My superficial impression of Ruby was: oh bloody hell, it’s a more object oriented Perl. That’s probably grossly unfair, but there was something about the tutorial that I was reading that reminded me of that kind of syntactic “look, aren’t we clever, we can do all this in just five characters” which really puts me off. Yes it may be powerful, but I don’t find terseness particularly attractive in computer languages. It’s surely not that much effort to type a few more characters is it?

My take with Perl was always: “it’s fun at the time, but I always end up feeling slightly dirty in the morning”. I am going to give Ruby another chance, but I’m a bit worried that it might be similar.

By the way Tom, don’t worry about the syntax barrier. Not being able to remember which language you’re in is the sign of a true programmer… so stop denying it and get on with your coding!