No macros in Python

Lulu of the Lotus-Eaters mertz at gnosis.cx
Sun Dec 15 22:16:21 EST 2002


|Lulu of the Lotus-Eaters <mertz at gnosis.cx> writes:
|> For all the raves I see about how wonderful Lisp macros are, it
|> always seems to amount to a slightly different way of spelling LOOP.

Patrick W <patrickw106 at yahoo.com.au> wrote previously:
|You kidding aren't you?  CLOS (Common Lisp Object System) is
|implemented with macros; it's a fully fledged object system supporting
|multiple inheritance, generic functions and multiple dispatch.  Hardly
|what anyone would call "a slightly different way of spelling LOOP."

I know Patrick W means to be defending the macro system of CL.  But I
simply cannot see CLOS' implementation as a feature rather than a bug
(or maybe just a wart).  The idea that one would -need- to use macros to
implement OOP sends shudders down my spine.  Especially when I think of
how painfully fragile and complicated the whole system is.

Of course, regular -users- of CLOS don't need to worry about the macros
that implement OOP.  Just like Python programmers can do OOP without
having to worry about the C code that implements objects.

Just as a "regular" programmer should not touch the macros that make up
CLOS, a "regular" programmer should not touch the underlying Python
interpreter.  When regular programmers use macros, it is inevitably
exactly as I stated:  to spell LOOP slightly differently, in a way that
no one else will immediately understand or remember (or something
similar).

Yours, Lulu...

--
---[ to our friends at TLAs (spread the word) ]--------------------------
Echelon North Korea Nazi cracking spy smuggle Columbia fissionable Stego
White Water strategic Clinton Delta Force militia TEMPEST Libya Mossad
---[ Postmodern Enterprises <mertz at gnosis.cx> ]--------------------------





More information about the Python-list mailing list