How does Ruby compare to Python?? How good is DESIGN of Ruby compared to Python?

John Roth newsgroups at jhrothjr.com
Wed Feb 25 18:06:49 EST 2004


"Cameron Laird" <claird at lairds.com> wrote in message
news:103qa53tajuhfdb at corp.supernews.com...
> In article <c1h1sb$1it26i$1 at ID-169208.news.uni-berlin.de>,
> Greg Ewing (using news.cis.dfn.de) <wmwd2zz02 at sneakemail.com> wrote:
> .
> [much good counsel]
> .
> .
> >Ruby code is liberally sprinkled with @-signs, which tends to
> >make it look slightly Perl-ish. But again that's a surface
> >issue, and Ruby is really no more like Perl than Python is.
> .
> .
> .
> While I'm all in favor of distinguishing superficial from
> fundamental characteristics, I think the last sentence
> above is misleading.  Ruby is a direct descendant from
> Perl, I'm sure; I thought I had the word from Matz himself
> that he deliberately modeled a great deal of Ruby on Perl
> (and Smalltalk, of course).  Although I can't find the
> passage now, I'm confident enough to repeat it here.  If
> necessary, I expect we can confirm the language's parentage.

To quote Matz's preface in the pickaxe book:

[begin quote]
I wanted a language more powerful than Perl, and more
object-oriented than Python.

Then, I remembered my old dream, and decided to design my
own language. At first I was just toying around with it at work.
But gradually it grew into a tool good enough to replace Perl.
[end quote]

To try to put it into the Perl lineage misses the point that,
for Matz, being object oriented was a primary goal, and while
Perl is a lot of things, object oriented isn't one of them.

The "funny characters" in Perl are type indicators, in
Ruby they are namespace controls. My personal opinion
(which I suspect isn't shared by very many Pythonistias)
is that Python would be improved by requiring explicit
access to the module and built-in namespaces, rather than
the default searches it uses now. To make that work, of
course, would require editor/ide support.

John Roth
> -- 
>
> Cameron Laird <claird at phaseit.net>
> Business:  http://www.Phaseit.net





More information about the Python-list mailing list