What's better about Ruby than Python?

Doug Tolton dtolton at yahoo.com
Wed Aug 20 19:28:41 CEST 2003

On Mon, 18 Aug 2003 18:16:07 -0600, "Andrew Dalke"
<adalke at mindspring.com> wrote:

>Doug Tolton
>> I don't agree at all.  Yes when you are defining a macro you are in
>> essence defining a new mini-language.  This is perhaps one of the most
>> powerful features of Lisp.  Programming closer to the application
>> domain, *greatly* enhances both the readability and the reusability of
>> code.
>For that domain.  And rarely does the author of a package,
>much less a macro, understand "the domain as understood by other
>people" vs. personal understanding.
It depends what you are talking about.  If you are talking about
making some large cross industry library I might be inclined to agree,
but when it comes to building good high level abstractions within a
company, this argument doesn't make sense.  Any feature has to be used
in the proper context for it to be useful, Macros are also this way.
>This topic has come up before.  Laura Creighton made several
>comments on macros, the most notable of which is:
>] Writing your own Lisp Macro System is better than sex. I
>] _know_ -- 18 year old me turned down _lots_ of opportunities
>] for sex to go hack on her macro system. Thus if we introduce
>] this to the language, I think that it is _inevitable_ that we will
>] fragment the Python community into a plethora of mutually
>] unintelligble dialects. I don't want this. Thus I don't want a
>] macro facility in the language _because_ it would be so cool.
I just don't find that argument compelling.  By that logic we should
write the most restrictive language possible on the most restrictive
platform possible (ie VB on Windows) because allowing choice is
clearly a bad thing.

Don't introduce a feature because it would be so cool that everyone
would use it?  That's just plain weird.

The Python Core language would still always be controlled by Guido,
but I don't see the problem with a community of people writing cool
macro's for python.

Linux is based on this concept of allowing people to extend the
system, it doesn't seem to have suffered from it.

>> That doesn't mean it *shouldn't* be available [in Python].
>> Python is Open Source, how would someone writing a
>> Macro lock you in?  Just don't use the macro.
>Another writing from Laura seems relevant:
>My interepretation - I don't customize my apps, nor even
>my .cshrc (except for one alias (alias ls 'ls -l \!* | grep ^d')
>an 'unset noclobber', 'set ignoreeof', and the PATH and
>LD_LIBRARY_PATH - and I wish I didn't need those)
>I don't, because I don't like to think.  At least not spend my
>time puzzling out slight changes.  I like my changes either
>none or a lot, that is, use Python as-is or write a converter
>(or use another language).

Same argument as above, I don't agree with this logic.  Python is a
great language, that doesn't mean it couldn't be better though.  If
that were the case development would be cease.

Why do we allow people to write functions even, I mean you have to
learn the syntax for calling them, what the variables are and what
they do.  Bah, we should make everyone use only built in functions, if
they want a different one, use a different language.  What?  It makes
no sense to me.

>> Just like anything else, Macro's can be over used and abused.  However
>> I maintain that if you don't see the usefulness of macros, you don't
>> really understand them.
>That's not the argument against them.  It's that they are too useful,
>each person makes their own dialect, the community breaks down
>as the different branches do their own thing, and one person's so-
>called "Python" code looks different than another's.
So don't allow people to customize the system huh?  They why is Python
Open Source?  That's the *entire* point of Open Source, so that people
can tweak and customize to their own environment.  Do you have any
specific examples that are comparable where customization broke a
community down?  This sounds like baseless hypothetical speculation to

>I know I am nowhere near as good a language designer as Guido,
>Larry Wall, Matz, and the others, though I think I'm pretty decent.
>I don't have the essential hubris to say that I know better how
>to tweak Python-the-language to fit my own domain.
You are saying you don't know how to tweak a language to fit it your
specific domain better than a general puprose language?  And you are
saying you are a pretty good language designer?  If you don't know
your specific domain well enough to adapt a general purpose language
to it better than it is already written there are several
1) You don't know your domain that well
2) You work in a very general purpose domain
3) You aren't a very good language designer

Designing a good language is all about designing the right high level
abstractions.  Even a medium skilled designer should be able to design
a language that maps better to their specific domain than a general
purpose domain (actually implementing is of course a vastly different
story).  The whole point of Macro's though is to allow you to leverage
the facilities the language provides while at the same time abstacting
the common idioms.

>> Essentially using Python over Machine
>> language is just using one big ass macro language.
>You confuse two meanings of the word 'macro' here.
>Any assembly language worth its salt has "macros", which
>are pre-assembled sets of code.  Use the macro and it
>generates the code.  But you can't use those macros to
>rewrite the actual language like you can with hygenic
>macros. It doesn't have the proper tail-biting recursive nature.

I am not talking about Assembly Macros.  I was comparing hygenic
macros to the ability to make useful high level abstractions.  Python
is an abstraction of Machine Language whereas Macros would allow you
to abstract Python.

You are in essence saying that Python is perfect, that no one could
make a more useful abstraction than it already has, and that saying
that one could do so is hubristic.  I reject your argument and your
logic as specious.  I think what makes Python so useful is the high
level abstractions it offers.  The fact that it let's me do things
that *I* know are right for my domain.  That it doesn't make the
assumption that Guido knows best for my domain (because I guarantee
you I know my domain better than Guido does).  Python doesn't treat me
like the idiot programmer who can't be given a powerful tool because
it might hurt me.  Ultimately this is the basis of Java / C# / Visual
Basic.  Don't give the programmer room, he might hurt himself, or
abuse something.  That paradigm is filled, there are many languages
that restrict programmers because they might misuse a feature, or they
are just too dumb to get it right.  I say fine, leave the languages
like Java / C# / VB to those people, but let's make Python a language
that allows people the room to do it the way it needs to be done, not
so much the way Guido or whoever thinks it should be done.

Just my 2p

Doug Tolton
(format t "~a@~a~a.~a" "dtolton" "ya" "hoo" "com")

More information about the Python-list mailing list