Brian Harvey scripsit:

> Yeah, I picked the example to try to be one step beyond
> reference-manual-toy, but rather just-barely-useful, which is my
> macrology comfort level, hence my (selfish) view of what WG1-Scheme
> needs.

The macro is indeed trivial; it just invokes a procedure, quoting the
arguments.  But the procedure invokes "eval", and in such a way as to
support the non-hygienic creation of names (that is, identifiers appear
in the macro's output that weren't present in the input).  Syntax-rules
can't do that, so a proper conversion would require either some redesign
or the use of a hygiene-optional system like syntax-case.

So while a technical conversion to syntax-rules is straightforward,
a proper conversion would require syntax-case.  "If your solution uses
eval, you're probably doing it wrong."  Either that, or switching to a
definition approach like SRFI-9, in which all the names defined by the
macro are apparent in the macro call, with no magic prefixes or suffixes
manufactured by the implementation.

-- 
I now introduce Professor Smullyan,             John Cowan
who will prove to you that either               [email protected]
he doesn't exist or you don't exist,            http://www.ccil.org/~cowan
but you won't know which.                               --Melvin Fitting

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to