Re: Python syntax in Lisp and Scheme

From: Erann Gat (gat_at_jpl.nasa.gov)
Date: 10/13/03


Date: Sun, 12 Oct 2003 19:14:56 -0700

In article <29kib.206536$hE5.6945256@news1.tin.it>, Alex Martelli
<aleaxit@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.



Relevant Pages

  • Re: mixed mode allowed for comparison macros?
    ... >> I don't see any reason it wouldn't be, why do you think it might not ... > Furthermore I have empirical evidence that prominent C committee members ... the whole point of the macros is to be able to perform ... non-exceptional comparision on real floating-point types. ...
    (comp.std.c)
  • Re: Why not FILE instead of FILE*?
    ... >>Not bad for a simple minded optimizer. ... There is a reason C is ... What is potentially dangerous in macros like getc and putc? ... Dan Pop ...
    (comp.lang.c)
  • Re: Macros and Excel 2002
    ... The macros are used for a reason - I'm converting a 5,000+ line exported ... HTML file into a particular Excel format and I don't want to do it line by ...
    (microsoft.public.security)
  • Re: Why use assembly?
    ... there is no reason for not doing this in Assembly. ... Example, Assembly HLL-Constructs macros, Assembly Compatible ... the language into something they were familiar with, ... It strikes me as a bad habit and is the reason why I avoid ...
    (alt.lang.asm)