The Artima Developer Community
Sponsored Link

Python Buzz Forum
Python and Ruby compared and contrasted

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ted Leung

Posts: 813
Nickname: twl
Registered: Jan, 2003

Ted Leung is principal of Sauria Associates, LLC. He is a member of the Apache Software Foundation
Python and Ruby compared and contrasted Posted: Aug 23, 2003 2:22 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ted Leung.
Original Post: Python and Ruby compared and contrasted
Feed Title: Ted Leung on the air : computers/programming/python
Feed URL: http://www.sauria.com/blog/computers/programming/python?flav=rss
Feed Description: Ted Leung on the air: Open Source, Java, Python, and ...
Latest Python Buzz Posts
Latest Python Buzz Posts by Ted Leung
Latest Posts From Ted Leung on the air : computers/programming/python

Advertisement
Lots of Python and Ruby comparisons out there:

Jim Weirich observes that Pythonistas and Rubyists bring different assumptions to the table:

Python follows C++ and Java in using "." as a structure selector operation, while Ruby is more closely attuned to Smalltalk's message sending paradigm. Both approaches work and are interally consistent, but be prepared for surprises if you try to interpret one using the assumptions of the other.
He also shows the result of his line noise calculator, which computes the number of line noise characters is a file. He ran this over equivalent C++, Java, Perl, Python, and Ruby code. It's instructive to see the programs laid out all in a row and see how much shorter the Python and Ruby programs are. I would like to see larger samples though, because I think that in larger Ruby programs, the line noise ratio increases.

Jeffrey Shell blogs on Python's philisophy of simplicity and then references a comp.lang.python post that goes over his assessment of Ruby vs Python in great detail. In the blog post, he extols the Python module system and quotes Tim Peters' "The Zen of Python". The newsgroup post goes over the stuff in Ruby that is matched by Python 2.2.

Hans Nowak has a series of 3 (so far) comparison posts. Here's some things I picked up:

first post
He sort of likes creative use of punctuation in Ruby. I'm the same. The use of ? and ! seem good to me.
second post
Ruby yield works on closures.
Ruby can define methods on instances.
third
He's not sure what the big deal is about procedure objects (closures). First classness.

Read: Python and Ruby compared and contrasted

Topic: Python and Gtk Previous Topic   Next Topic Topic: Robijn, fleur en fijn

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use