Alex Martelli on the differences between Python and Ruby

December 18th, 2007 § 5 comments

I saw this google-groups post cross red­dit this morn­ing, and I really con­sider it one of the most lucid dis­cus­sions on the dif­fer­ences between the two languages.

Oth­ers no doubt base their choice of pro­gram­ming lan­guages on just
such issues, and they gen­er­ate the hottest debates — but to me that’s
just an exam­ple of one of Parkinson’s Laws in action (the amount on
debate on an issue is inversely pro­por­tional to the issue’s actual
importance).

Myself? I’ve always found that Ruby’s ten­dency to lean more towards perl-like syn­tax to be the turnoff (line noise for the loose), not the actual con­cepts behind the lan­guage, although Alex’s points about “too much dynam­ic­ity” are quite good. Ruby does have a lot of good fea­tures that may even­tu­ally find their way into Python. Although, I’d much rather see Erlang-ish fea­tures with­out the dense syntax.

  • Dave

    God, Erlang is like the ugli­est lan­guage ever seen. I don’t get why all of the con­cur­rency focused lan­guages have to be so ugly.

  • jnoller

    YES. They all seem to scream “this lan­guage is great… because you need a PHD to use it”.

  • http://farmdev.com/ Kumar McMil­lan

    I agree, Erlang is pretty ugly but I’d love to see some of the OTP (open tele­com plat­form) good­ness ported to Python. There are a few com­pa­ra­ble pack­ages already but noth­ing as rock solid as OTP.

    And I agree about the perl­ness of Ruby. This may actu­ally be the one thing hold­ing me back from using the lan­guage. Oh what perl scars I’ve endured! :) Future ver­sions of Ruby seem to be mov­ing past dep­re­ca­tion of the perl­ness into flatout drop­ping it com­pletely. I will be much more keen on using Ruby when that day comes.

    Now that my mem­ory is jogged … beyond the perl­ness, it was the slow­ness of Ruby 1.8 that turned me off of it. This seems to be chang­ing too:
    http://antoniocangiano.com/2007/11/28/holy-shmo

    …which also makes the future of Ruby appealing.

  • http://pentropy.twisty-industries.com Cliff Wells

    I find it odd that peo­ple seem to ignore what I con­sider the most impor­tant dis­tinc­tion between Ruby and Python: Ruby is expression-based and Python is statement-based. This sin­gle dis­tinc­tion puts them as far apart as can be despite any other sim­i­lar­i­ties they might have (think FORTRAN vs LISP).

    Per­son­ally this is the only really appeal­ing aspect of Ruby over Python. The other (mis)features are mere fluff by comparison.

    Boo is a nice exam­ple of what Python would be like if it were expression-based. Frankly, if Boo weren’t so .NET (and by exten­sion, Win­dows) –cen­tric, I’d have switched some time ago (Boo does work on Mono, but it seems most of the dis­cus­sion and rather sparse doc­u­men­ta­tion focus on Win­dows, so Linux/Mono users will feel a lit­tle out in the cold).

  • http://pentropy.twisty-industries.com Cliff Wells

    I find it odd that peo­ple seem to ignore what I con­sider the most impor­tant dis­tinc­tion between Ruby and Python: Ruby is expression-based and Python is statement-based. This sin­gle dis­tinc­tion puts them as far apart as can be despite any other sim­i­lar­i­ties they might have (think FORTRAN vs LISP).

    Per­son­ally this is the only really appeal­ing aspect of Ruby over Python. The other (mis)features are mere fluff by comparison.

    Boo is a nice exam­ple of what Python would be like if it were expression-based. Frankly, if Boo weren’t so .NET (and by exten­sion, Win­dows) –cen­tric, I’d have switched some time ago (Boo does work on Mono, but it seems most of the dis­cus­sion and rather sparse doc­u­men­ta­tion focus on Win­dows, so Linux/Mono users will feel a lit­tle out in the cold).

What's this?

You are currently reading Alex Martelli on the differences between Python and Ruby at jessenoller.com.

meta