Ruby Impressions

Alex Martelli aleax at aleax.it
Sun Jan 13 10:59:56 EST 2002


Adam Spitz wrote:
        ...
> Ruby is made for the people out there who nodded their heads when I
> described my reasoning just now. It's a language that's harder to
> learn than Python is, but a bit less restrictive than Python is - and

I don't understand this.  Where is the current Python version (2.2)
more restrictive than Ruby?  Haven't many Python ways to perform the
same task you wanted been proposed, including for example my very
simple metaclass, to which I haven't seen you respond?

> the *culture* is a *lot* less restrictive than the Python culture is.

Maybe.  A shared Python cultural value does seem to be "black magic
is cool, but simplicity is best, except where using deep tricks buy 
you a LOT -- you don't pepper your production code with cool tricks 
just because they are cool".  I don't think I would call this in any
way "restrictive", just a proper acknowledgement to the huge worth
of SIMPLICITY.  "Everything should be as simple as possible (but no
simpler than THAT)".

On the other hand, people such as the Twisted Matrix band are most
definitely part of the Python culture -- and it seems to me their
take on "deep tricks" is quite subtly different.  Have a look at
http://twistedmatrix.com and decide for yourself.  I also predict
that the deep simplification of the metaclass idea (which has been
in Python for ages) into 2.2's metatypes (still called metaclasses)
will make quite a few metaclass uses moderately popular, with time.

Simplicity remains the lodestar.  "Cute" remains an ambivalent term,
half-praise, half-warning.  If one's main purpose in life is to show
how deucedly CLEVER he is, Python is definitely not optimal (Perl and
C++ would seem to be, for this specific purpose -- maybe Ruby does
compete with them?).  On the other hand, if the purpose is producing
high-quality code, that satisfies many needs and is easy to evolve
as the needs change, I still don't know of a better tool than Python.
And I, personally, don't see what's "restrictive" about this.


Alex




More information about the Python-list mailing list