3 ms·
Well... they're both popular, dynamic, object-oriented programming languages with a clean syntax. But that doesn't make them interchangeable. ;-) In general I
by ajdecon 15y ago
Well... they're both popular, dynamic, object-oriented programming languages with a clean syntax. But that doesn't make them interchangeable. ;-)
In general I find that Python is the easiest language for me to "think in", syntax-wise. It is almost pseudo-code in its simplicity, and I like that it has extremely powerful namespaces. It also seems to me that it's easier to write programs in Python which ignore object orientation in favor of a more functional style, than it is in Ruby. I'm slowly falling out of love with OOP, and Ruby loves its objects.
I also really like Python's libraries for numerical and scientific work. For whatever reason, Python took off in the scientific community, and it's got libraries like NumPy and SciPy which I haven't seen duplicated in Ruby. It's also easy to integrate with existing Fortran and C libraries... and if you've done much work with Fortran, you know that it might be blazing fast but it's not the most pleasant thing to work in. Much nicer to glue it together with Python. :-)
Where Ruby shines for me is in its libraries for server configuration and web development. I like Python's webdev libraries, but I still find it easier to work with Rails or Sinatra than with Django or Bottle. I also think that Chef is one of the best things ever for managing servers in a programmatic fashion, and for that you need Ruby.