3 ms·
The obvious niche for Ruby is the niche shared by Perl and Python. Having used Ruby full-time for 4-5 years and Python full-time for the past year, I think Pyth
by philwelch 9y ago
The obvious niche for Ruby is the niche shared by Perl and Python. Having used Ruby full-time for 4-5 years and Python full-time for the past year, I think Python is strictly better than Ruby in the particular areas mentioned by the author.
I can think of a couple major reasons one would prefer Ruby to Python, but only a couple:
* Ruby has a more flexible syntax, which means you can write "DSL's" in Ruby. Rake and RSpec are generally given as examples. Unlike actual DSL's, though, Ruby just lets you leave out parentheses so you can pretend that the handful of functions you just call a lot in a Rakefile or an RSpec test are keywords. I'm not sold, but some people may prefer this aesthetically, and there's really no way to argue against that.
* Ruby is all-in on object orientation, in a "poor man's Smalltalk" kind of way. There are advantages to this, since you can just.call.methods.on.everything(like: this) or iterate by calling .each, which is simpler than Python's double-underscore protocols. There are surprisingly few disadvantages, because you don't have to actually write in an object-oriented style in Ruby.
I personally don't find these arguments convincing.