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:
- 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.
- 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).
- I’m not convinced that Modules are really a good substitute for multiple inheritance.
- 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:
- It’s looping constructs are parallel to Python
- It, arguably, has the best closure support outside of Lisp and ECMAScript derived languages. 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” 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.”
-  It will be nearly impossible to get better closure support than ECMAScript or Lisp ↩
-  A quote from Jeff Attwood’s Coding Horror ↩
-  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. ↩