[plt-scheme] Defining syntax parameters that act like ordinary symbols outside of syntax-parameterize

From: Remco Bras (vrsoft at gmail.com)
Date: Sun Feb 21 15:59:58 EST 2010

Hi,

I'm using quite a few macros that use syntax parameters, so I'd like them to act like ordinary symbols (when not in syntax-parameterize) to not clutter up the namespace too much.
I wrote an attempt (see below) to alpha-rename the parameters to gensyms outside of syntax-parameterize.
Could someone tell me if this will work properly?
So far, I haven't found a way to break it.

(define-syntax-parameter foo
			 (let ((sym (gensym)))
			   (make-rename-transformer (datum->syntax #f sym))))

-Remco


Posted on the users mailing list.