| Over the last couple of years I have been programming in Python almost exclusively (and some JavaScript, Bash and Go for some specific tasks, easily chosen for the task at hand instead of Python). What I found with Python is that it is a great platform for doing my things, like web services, data transformation, general Linux automating, infrastructure monitoring, and so on. As it is good enough for 90% of my needs, I settled down on it and now I feel that I am missing opportunities of being more productive and getting more knowledge from other languages. I looked at Ruby and found some interesting aspects (as a former Perl programmer), with its expressiveness. I learned a bit of Ruby, but I keep doubting myself if Ruby language and platform would bring me more value or that would only bring fragmentation on my projects. I do not look to replace Python, but want to know if there would be some clear decisions points to take when choosing between Python and Ruby for my next projects, or both are more or the less a tool to solve the same problems. If any of you worked or work with both languages, sharing your experiences would be greatly appreciated. |
There isn't much you're missing. About the only use-case I can think of where Ruby has a clear advantage is in creating a DSL.
Other than that, there are differences in what already exists in the two ecosystems, but (at least for web development) generally there are equivalents available (eg. Nokogiri vs. BeautifulSoup). The Rails and Django frameworks are roughly comparable, for example, with Rails being more 'magical' vs. Django being more explicit. Which one is better for you may just come down to your personal tastes.
Now, outside of web development, Python has a clear advantage in areas such as scientific computing, game development, machine learning, and many other areas in which Ruby doesn't really have much of a presence. This isn't due to any inherent quality of the two languages, just historical contingency, as Ruby's emergence from obscurity was a result of Rails taking off, whereas Python grew a large and eclectic user community (of which web development was a small part) more slowly, but starting years earlier.