Python syntax in Lisp and Scheme

Joe Marshall jrm at ccs.neu.edu
Mon Oct 6 10:09:11 EDT 2003


David Rush <drush at aol.net> writes:

> On Sat, 04 Oct 2003 16:48:00 GMT, <prunesquallor at comcast.net> wrote:
>> 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.
>
> But it may also be a mistake to use macros for the boilerplate code when
> what you really need is a higher-order function...

Certainly.

One should be willing to use the appropriate tools: higher-order
functions, syntactic abstraction, and meta-linguistic abstraction
(embedding a domain-specific `tiny language' within the host
language).  Macros come in handy for the latter two.





More information about the Python-list mailing list