[plt-scheme] Re: On hygiene and trust

From: Joe Marshall (jmarshall at alum.mit.edu)
Date: Thu Jul 9 18:46:30 EDT 2009

On Wed, Jul 8, 2009 at 12:48 PM, leppie<xacc.ide at gmail.com> wrote:
>>
>> (define-event foo bar (arg1 arg2 ...)
>>    (form1)
>>    (form2 ...) etc.)
>>
>> into something like this:
>>
>> (define (foo$bar arg1 arg2 ...)
>>    (form1)
>>    (form2 ...) etc.)
>>
>
> How will the implementation be any different between defmacro and
> syntax-case in your example?

In two (minor) ways.  The syntax-case version will have to resolve the
first two arguments into symbols before pasting them, then turn them back
into an identifier that is scoped in the original environment before inserting
it into the final form.  It isn't obvious to me whether you want the define to
be hygienic or not.


-- 
~jrm


Posted on the users mailing list.