[R6RS] syntax-case semantics

Matthew Flatt mflatt at cs.utah.edu
Fri Mar 17 11:43:16 EST 2006


At Fri, 17 Mar 2006 05:49:19 -0500, Anton van Straaten wrote:
> Might it make sense to add to traditional syntax-case something like a 
> FRESH-SYNTAX form, which uses the SRFI 72 semantics?  That would allow 
> the sorts of problem examples given in the SRFI to be written safely and 
> easily.

A data point, for what it's worth:

MzScheme has this, in the form of `make-syntax-introducer'. 

It has been especially useful once, in a case where a set of macros
effectively re-implement a local macro expander; this expander works
with a set of transformers that shouldn't be confused with normal macro
transformers, thought they act essentially the same. (This sub-language
of expanders is for expanding lexer abbreviations in our parser tools.)

In one other place, `make-syntax-introducer' is used to generate a
temporary name that prints the same as some other name.

Many other attempts to use `make-syntax-introducer' have turned out to
be bad ideas.

I don't think I've ever tried to use it to solve a meta-hygiene
problem, but maybe only because the problem hasn't shown up.


Matthew




More information about the R6RS mailing list