What's better about Ruby than Python?

Andrew Dalke adalke at mindspring.com
Thu Aug 21 20:51:32 CEST 2003

Olivier Drolet:
> Really cute intuition pump you've got there, Alex!  :-)

Err, it was me, no?

> Macros don't require that you change variable names, just the syntax.
> Macros in Python would then not be equivalent to new words, but new
> constructs. And yes, you need to know their meaning, but is this
> effort greater than managing without them? Have you or any opponents
> of macros on this news group never seen a context in which the
> advantages of macros outweigh their overhead?

Sure.  Having macros would have let people experiment with
generators without tweaking the core language.  Would have let
people implement their own metaclass mechanisms instead of
waiting until they were added to the C code.

The complaint has never been that there is no context for which
macros cannot provide the better solution.

I think this track of the discussion will go no further.  Let's
assume that I am convinced that not only are macros the best
thing since chocolate but that it should be added to Python.

Following Aahz's suggestion -- what would a Python-with-macros
look like?

                    dalke at dalkescientific.com

More information about the Python-list mailing list