Python syntax in Lisp and Scheme

prunesquallor at comcast.net prunesquallor at comcast.net
Sat Oct 4 12:48:00 EDT 2003


Frode Vatvedt Fjeld <frodef at cs.uit.no> writes:

> 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
> 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.

But syntactic abstractions *are* a change to the language, it just
sounds fancier.  

I agree that injudicious use of macros can destroy the readability of
code, but judicious use can greatly increase the readability.  So
while it is probably a bad idea to write COND1 that assumes
alternating test and consequence forms, it is also a bad idea to
replicate boilerplate code because you are eschewing macros.
 




More information about the Python-list mailing list