Python syntax in Lisp and Scheme

Erann Gat gat at jpl.nasa.gov
Sun Oct 12 22:14:56 EDT 2003


In article <29kib.206536$hE5.6945256 at news1.tin.it>, Alex Martelli
<aleaxit at yahoo.com> wrote:

> > What makes you think that macros have farther reaching effects in this
> > regard than functions? If I call a method and pass it a function object,
> > I also don't know what the method will do with it.
> 
> Of course not -- but it *cannot possibly* do what Gat's example of macros,
> WITH-MAINTAINED-CONDITION, is _claimed_ to do... "reason" about the
> condition it's meant to maintain (in his example a constraint on a variable
> named temperature), about the code over which it is to be maintained
> (three functions, or macros, that start, run, and stop the reactor), 
> presumably infer from that code a model of how a reactor _works_, and
> rewrite the control code accordingly to ensure the condition _is_ in fact
> being maintained.  A callable passed as a parameter is _atomic_ -- you
> call it zero or more times with arguments, and/or you store it somewhere
> for later calling, *THAT'S IT*.  This is _trivially simple_ to document and
> reason about, compared to something that has the potential to dissect
> and alter the code it's passed to generate completely new one, most
> particularly when there are also implicit models of the physical world being
> inferred and reasoned about.  Given that I've seen nobody say, for days!, 
> that Gat's example was idiotic, as I had first I thought it might be, and 
> on the contrary I've seen many endorse it, I use it now as the simplest
> way to show why macros are obviously claimed by their proponents to
> be _scarily_ more powerful than functions.

Why "scarily"?

E.




More information about the Python-list mailing list