Python syntax in Lisp and Scheme

Alex Martelli aleax at aleax.it
Sat Oct 4 13:07:12 EDT 2003


Frode Vatvedt Fjeld wrote:

> Alex Martelli <aleax at aleax.it> writes:
> 
>> Good summary: if you fancy yourself as a language designer, go for
>> Lisp; if you prefer to use a language designed by somebody else,
>> without you _or any of the dozens of people working with you on the
>> same project_ being able to CHANGE the language, go for Python.
> 
> I believe it is very unfortunate to view lisp macros as something that
> is used to "change the language". Macros allow syntactic abstraction

Maybe "enhance" can sound more positive?  An enhancement, of course,
IS a change -- and if one were to perform any change, he'd surely be
convinced it WAS going to be an enhancement.  (Whether it really
turned out to be one is another issue).

> the same way functions allow functional abstraction, and is almost as
> important a part of the programmer's toolchest. While macros _can_ be
> used to change the language in the sense of writing your own
> general-purpose iteration construct or conditional operator, I believe
> this is an abuse of macros, precisely because of the implications this
> has for the readability of the code and for the language's user
> community.

Sure, but aren't these the examples that are being presented?  Isn't
"with-collector" a general purpose iteration construct, etc?  Maybe
only _special_ purpose ones should be built with macros (if you are
right that _general_ purpose ones should not be), but the subtleness
of the distinction leaves me wondering about the practice.


Alex






More information about the Python-list mailing list