[r6rs-discuss] macroexpand

From: John Cowan <cowan>
Date: Fri Sep 22 18:24:05 2006

Dan Muresan scripsit:

> First, there was define-macro and macroexpand. These tools were sometimes
> dangerous, but had all the expressive power anyone could ask for.

Let's get the history straight here. R0RS (1975) had AMACRO, and R1RS
(1978) had MACRO, and they worked like define-macro, though there was
no equivalent of macroexpand. However, these reports described only the
primeval Scheme embedded in MacLisp, and they have been totally obsolete
since the publication of R2RS in 1985.

R2RS and R3RS (1986) had motherhood notes explaining that although all
Schemes had macro systems, none were being standardized. R4RS (1991)
provided syntax-case as a documented extension, and R5RS (1998) moved
it, with a few changes, into the body of the report.

For more than twenty years, therefore, there has been *no* Scheme standard
providing low-level macros. OTOH, many implementations have done so.

> Syntax-rules broke Scheme by allowing only the simplest of macros to be
> defined. Would it not have been more responsible to leave define-macro in
> R5RS until its capabilities could be replicated by more advanced systems?

If it had been in any R?RS back to 1985, it would indeed have been
irresponsible. Since it wasn't, it wasn't.

(Personally, you couldn't pay me to use define-macro. I don't have that
much faith in my own omniscience.)

-- 
Her he asked if O'Hare Doctor tidings sent from far     John Cowan
coast and she with grameful sigh him answered that      http://ccil.org/~cowan
O'Hare Doctor in heaven was. Sad was the man that word  cowan_at_ccil.org
to hear that him so heavied in bowels ruthful. All
she there told him, ruing death for friend so young,    James Joyce, Ulysses
algate sore unwilling God's rightwiseness to withsay.   "Oxen of the Sun"
Received on Fri Sep 22 2006 - 18:23:58 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC