I appreciate both of these responses and can identify with some of the
expressed sentiments, however the criticism of syntax-case by Chris
Hanson demonstrates a misunderstanding of the system.

The syntax-case system does not consist of a new language, but rather
promotes Scheme itself to the defining language of syntactic
transformations.  This is in contrast to syntax-rules, which can be
considered a term-rewriting system, is declarative, and constitutes a
language distinct from Scheme.  Syntax-case, however, uses Scheme
procedures and a new datatype: syntax objects.  A transformer is
simply a procedure of type syntax object -> syntax object that is
"registered" with the expander via {define,let,letrec}-syntax.

That the syntax object datatype comes with a form for pattern-matching
based deconstruction and a form for template based construction does
not push matching and templating to the center of the macro writing
process (again, in contrast to the syntax-rules mechanism).  Macros
need not be written in this matching/templating style[*].
Syntax-{car,cdr,cons}, for example, are easily definable.

David

* For this reason, I think "syntax-case" is a poor choice of names for
the procedural macro mechanism of the R6RS draft.

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

Reply via email to