[PYTHON] YAPVRA (Yet Another Python vs. Ruby Article)

Interesting blog post from a Pythonista on “Linguistic Simplicity,” and
why Ruby fails to pass muster.

http://toulouse.amber.org/archives/2003/08/21/linguistic_simplicity.html

And, please, this is not an invitation to a flame war or general
grousing. Read it to see how others perceive Ruby. If you think the
author has misrepresented something, post a polite comment to his blog.

(And if you think the preceding comments were obvious, then my apologies.)

James

Interesting blog post from a Pythonista on “Linguistic Simplicity,”
and why Ruby fails to pass muster.

Python users are always harping on how in Python code looks the same,
no matter who writes it, because a fundamental design decision for
Python is that there should only be one way of doing something. But
that simply isn’t true, even with the most basic of features, “import”

import fibo
fibo.fib(1000)
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

from fibo import fib
fib(500)
1 1 2 3 5 8 13 21 34 55 89 144 233 377

import fibo as foobar
foobar.fib(1000)
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987

from fibo import fib as bif
bif(200)
1 1 2 3 5 8 13 21 34 55 89 144

As for the rest of his entry, it’s mostly flamebait. Perhaps
unintentional, but he misrepresents certain aspects of Ruby. He
prefers the syntax of Python to that of Ruby. Fine. He doesn’t get
that conditional expressions could be designed to return values. Fine.
My reasons for disliking Python are mostly personal too. I happen not
to like too many underscores. I dislike explicitly passing “self” to
methods in a supposedly object-oriented language. (Incidentally, the
same thing I dislike about Perl’s OO syntax, and Ruby is supposed to be
the one that’s more Perl-like).

The most common complaint I’ve heard about Ruby from Python people is
that there’s more than one way of doing something, and there are
strange shortcuts and Perl like special variables around. There’s
something they don’t seem to realize (and what you wouldn’t realize
unless you spent some time with Ruby). Although there’s more than one
way to do things, there’s the path of least resistance, and everybody
seems to follow it. Sure, $_ exists, but nobody seems to use it,
because the places it is mostly used in Perl are done with iterators in
Ruby.

What’s funny is that from his page he links to a post he made in
comp.lang.python about his experiences with Ruby, and that post was
made in response to a post by “Brandon J. Van Every”, asking “What’s
TOTALLY COMPELLING about Ruby over Python?”

Ben

···

On Saturday, August 23, 2003, at 02:04 PM, james_b wrote: