Alex Martelli on the differences between Python and Ruby

I saw this google-groups post cross reddit this morning, and I really consider it one of the most lucid discussions on the differences between the two languages.

Others no doubt base their choice of programming languages on just
such issues, and they generate the hottest debates — but to me that’s
just an example of one of Parkinson’s Laws in action (the amount on
debate on an issue is inversely proportional to the issue’s actual
importance).

Myself? I’ve always found that Ruby’s tendency to lean more towards perl-like syntax to be the turnoff (line noise for the loose), not the actual concepts behind the language, although Alex’s points about “too much dynamicity” are quite good. Ruby does have a lot of good features that may eventually find their way into Python. Although, I’d much rather see Erlang-ish features without the dense syntax.

  • I find it odd that people seem to ignore what I consider the most important distinction between Ruby and Python: Ruby is expression-based and Python is statement-based. This single distinction puts them as far apart as can be despite any other similarities they might have (think FORTRAN vs LISP).

    Personally this is the only really appealing aspect of Ruby over Python. The other (mis)features are mere fluff by comparison.

    Boo is a nice example of what Python would be like if it were expression-based. Frankly, if Boo weren't so .NET (and by extension, Windows) -centric, I'd have switched some time ago (Boo does work on Mono, but it seems most of the discussion and rather sparse documentation focus on Windows, so Linux/Mono users will feel a little out in the cold).

  • I agree, Erlang is pretty ugly but I'd love to see some of the OTP (open telecom platform) goodness ported to Python. There are a few comparable packages already but nothing as rock solid as OTP.

    And I agree about the perlness of Ruby. This may actually be the one thing holding me back from using the language. Oh what perl scars I've endured! :) Future versions of Ruby seem to be moving past deprecation of the perlness into flatout dropping it completely. I will be much more keen on using Ruby when that day comes.

    Now that my memory is jogged ... beyond the perlness, it was the slowness of Ruby 1.8 that turned me off of it. This seems to be changing too:
    http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/

    ...which also makes the future of Ruby appealing.
  • Dave
    God, Erlang is like the ugliest language ever seen. I don't get why all of the concurrency focused languages have to be so ugly.
  • YES. They all seem to scream "this language is great... because you need a PHD to use it".
blog comments powered by Disqus