Seven in seven: week 1 — Ruby

So, I just finished the Ruby section of Seven Languages in Seven Weeks and I have to say that my reaction is best summed up in the words of one of my college professors: “Go to the library and listen over it once. You’ll say, ‘Eh, that’s nice,’ and put it back on the shelf never to listen to it again.”

I can understand why people like Ruby. It has a fairly clean syntax and, more importantly, it has macros. The syntax flows logically from itself in a very nice way.

But, here’s my reasoning for giving the language a “meh” rating:

  1. There is the ability to re-write a class method definition.  While this is incredibly useful, it is also an extraordinarily bad thing.  Yes, I can appreciate the fact that it becomes insanely simple to add a method to, or rewrite the existing method of a class.  On the other hand, it also becomes insanely difficult to debug said method.  And, while I do love and cherish macros, the policy of allowing people to modify classes after their definitions is dangerous and I can foresee naught but evils coming from this in larger projects.
  2. I don’t like unless, period.  Technical languages should be as simple and straightforward as possible, the inclusion of superfluous conditionals needlessly increases the time needed to comprehend code (I also question the syntax foo = a if <test> else b in Python).
  3. I’m not convinced that Modules are really a good substitute for multiple inheritance.
  4. Parentheses are often optional (This is stylistic and completely non-objective, but this is also my article.  It makes me nervous).

That said, Ruby has some very powerful benefits:

  1. It’s looping constructs are parallel to Python
  2. It, arguably, has the best closure support outside of Lisp and ECMAScript derived languages[1].  I do object to the syntax slightly, but that is OK.

I think that it is obligatory to mention performance, but it only needs to be mentioned.  In an age where quotes like, “Optimizing is for people who can’t afford RAM”[2] are common, I really do wonder about the future of those performance woes.

I’ll say one last thing before I leave this topic off.  I have an inkling, though I obviously can’t confirm this, that I may have really liked Ruby had I encountered it before Python.  It has a lot of the things I really liked about Python, and it even has some of the things that I wish Python supported better (once again, its closures are great, and it has macros).  But, when I was going through all of the tutorials and instructions, I kept having the thought, “Yea, but I would rather have my indents or parentheses.”[3]



  1. [1] It will be nearly impossible to get better closure support than ECMAScript or Lisp
  2. [2] A quote from Jeff Attwood’s Coding Horror
  3. [3] A friend of mine suggested that it might be a good idea for me to actually go ahead and learn <em>Rails</em> as well.  Apparently, that will significantly improve my view of Ruby.  I’m doubtful, especially since I already have very high opinions of both Django and Symfony.  But, in the interest of fairness, I will at least complete the Rails tutorial.
This entry was posted in Languages, Ruby and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>