Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

The Philosophy of Ruby

The Philosophy of Ruby is the first part of Artima’s interview with Yukihiro Matsumoto (aka Matz), creator of the Ruby language. The interview touches on the philosophical differences between Python and Ruby, in particular Python’s preference for having one obvious way of doing things:

Ruby inherited the Perl philosophy of having more than one way to do the same thing. I inherited that philosophy from Larry Wall, who is my hero actually. I want to make Ruby users free. I want to give them the freedom to choose. People are different. People choose different criteria. But if there is a better way among many alternatives, I want to encourage that way by making it comfortable. So that’s what I’ve tried to do. Maybe Python code is a bit more readable. Everyone can write the same style of Python code, so it can be easier to read, maybe. But the difference from one person to the next is so big, providing only one way is little help even if you’re using Python, I think. I’d rather provide many ways if it’s possible, but encourage or guide users to choose a better way if it’s possible.

Ruby vs Python is currently threatening to overtake Perl vs Python as the favourite holy war amongst language geeks. I’m predisposed towards Python, mainly because I haven’t seen any benefits of Ruby over Python strong enough to convince me to invest some serious time in the former.

This is The Philosophy of Ruby by Simon Willison, posted on 2nd October 2003.

View blog reactions

Next: Outlook not so good

Previous: Balancing Act

6 comments

  1. *Nods* The Python and Ruby do pretty much scratch the same itch. It's why I've not really learned python - " I haven't seen any benefits of X over Y strong enough to convince me to invest some serious time in the X." ;)

    Daniel Von Fange - 2nd October 2003 20:40 - #

  2. I think it comes down to this -- it's time for a new language and which do you hate more: enforced whitespace or still having prefixes like "@" changing the meaning of your variables?

    HHOS

    Joe Grossberg - 2nd October 2003 22:15 - #

  3. Both languages are really beautiful and fit their purpose. If there was no Ruby I would definately use Python. If you haven't investigated in Ruby please do. It is well worth your time. I have seen you making comments about pythons interactive shell. You seem to like it. This is called IRB with ruby. Just give it a try. You should not need more than a day or two to find out enough about Ruby to have a more founded opinion. A good starting point is the pickaxe of course.

    Programming Ruby Online

    I don't think one should miss out on any of the two languages. I am certainly going to keep on learning and using both.

    I am very much looking forward to the next parts of the interview with Matz on Artima.

    Sasa Velickovic - 2nd October 2003 23:26 - #

  4. My my, haven't you been busy today

    alanjstr - 2nd October 2003 23:58 - #

  5. "I think it comes down to this -- it's time for a new language and which do you hate more: enforced whitespace or still having prefixes like "@" changing the meaning of your variables?"

    ...choose PHP and avoid both... but keep your variable names short ;)

    Harry Fuecks - 3rd October 2003 01:19 - #

  6. Hi Simon,

    just jound a nice document describing the differences between Python and Ruby in a nice way.

    Rubylectures

    A set of slides used in a course at the University of New South Wales. The course was about Extreme Programming, Python and C++ and Ruby was presented as an alternative to Python, which the students were learning.

    See the PDF Nice document if you are into Python and want to find out what the fuss about Ruby is ;) Have fun

    Sasa Velickovic - 6th October 2003 11:01 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2003/10/02/philosophyOfRuby

A django site