16 December 2009
What is wrong with Ruby
After using Ruby massively for a few years, I think I have now enough understanding to finally see its main flaw. As a starting point to try to see it too, consider mentally splitting the Ruby language into two parts - “programming part” and “metaprogramming part”. This is of course a fully artificial distinction, as in reality they are closely tangled together, but I find such an attempt a useful experiment.
What I would consider a part of Ruby’s normal programming features are the things programmers who ship end-user applications use everyday - classes, objects, methods, loops, variables etc. The metaprogramming features are what is mostly used by people who build applications for other programmers, but normally not by the “average Joe”, so the techniques behind things like Rails, RSpec, Rake, Rack and other major Ruby frameworks and libraries. Much of the appeal of those projects lies in the elegance of the languages they make available to their users, making it easy to describe solutions to problems the given framework is targeting. The specific features I have in mind are things like metaclasses, instance_eval, class_eval, method_missing, alias_method an so on, all hidden behind an easy to use abstraction layer.