| My take on Ruby vs Python is this: While Python has a healthy web dev ecosystem, Ruby's feels much larger to me. That's almost certainly because Rails is so wildly popular. And Rails is an excellent, mature framework. So for web dev, I would consider Ruby the winner. Python is the clear winner for scientific computing. That's not really due to anything
inherent in the language. It's an ecosystem thing. If you were using Fortran before,
you might be working in a problem domain where Python dominates. Both are excellent for miscellaneous scripting work. E.g. reading in a CSV file and doing something with each row; batch-processing a bunch of images; renaming 1000 files according to some ruleset; gathering some system data and sending nightly status emails. In terms of syntax and features, they're very very similar. Python has meaningful
whitespace, which you may like or dislike. (I think it's good for enforcing proper
formatting, but you're free to disagree.) Ruby has multiple ways of expressing the
mathematical concept of a function (methods, blocks, and procs), which has its pros and
cons. Both have metaprogramming facilities, though I find Ruby's more pleasant. If I remember correctly, it was in large part the metaprogramming that made DHH pick Ruby for Rails. |
But many other readings and the fact twitter and groupon were coded in ruby, made the choice! I've read that twitter now is moving to scala, but as there are a lot more resources out there for learning ruby/python, I kicked it out of the list.
I like ruby, sometimes it seems a bit confusing when there are many ways to express the same thing, but it's approach to natural language is helpful.
Thank you all for your quick responses! It's a pleasure to join the HN community!!