[plt-scheme] What are syntax-case pattern variables?

From: Jos Koot (jos.koot at telefonica.net)
Date: Wed May 14 20:33:59 EDT 2008

Pattern variables may look somewhat mystically, because their scope is for 
the templates, independently from the scope of normal variables. However, 
trying check syntax on a number of examples may clarify a lot. It did for 
me. Just follow the arrows. You may also want to play with compilation time 
variables and pattern variables of the same name. It is instructive I think 
(: it was for me :) They live in separate worlds. Of course this does not 
answer your question in detail. I don't know how things are implemented. I 
am curious, but for usage the behaviour is more important than the details 
of the  implementation, I think.
----- Original Message ----- 
From: "Grant Rettke" <grettke at acm.org>
To: "PLT Scheme List" <plt-scheme at list.cs.brown.edu>
Sent: Wednesday, May 14, 2008 11:30 PM
Subject: [plt-scheme] What are syntax-case pattern variables?

> Hi folks,
> syntax-case takes a syntax object as an argument and destructures it
> via pattern matching into pattern variables.
> What are pattern variables composed of?
> syntax takes a template, and the pattern variables in it, to produce a
> syntax object that has the same lexical scoping as that of the pattern
> variable, so where does that lexical scope get stored?
> Best wishes,
> Grant Rettke
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme 

Posted on the users mailing list.