[r6rs-discuss] One vote

From: David Van Horn <dvanhorn>
Date: Mon, 13 Aug 2007 20:09:02 -0400

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.
Received on Mon Aug 13 2007 - 20:09:02 UTC

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