[plt-scheme] DrScheme and sound. Perhaps somebody did it.

From: Geoffrey Knauth (geoff at knauth.org)
Date: Fri Oct 17 16:13:42 EDT 2003

Argh, I need to eat my own words. Yes Matthew is correct. It should be 

A year ago, he and I and some others were discussing hygiene during a 
ride in Pbg. He said something like "I implemented hygiene but I sure 
it's all black magic still." I smiled and thought "sure."

So now he caught me. Even though x stands for y when it's spliced into 
lambda it must have a different counter (color) than the y that the 
introduces because both can be identifiers and may end up in a variable
position (binding or bound). So when they finally do -- if lambda isn't
redefined -- the different colors get turned into different bindings. If
lambda is redefined and these things become symbols the colors are
removed. That explains my stupid example.

Sorry -- Matthias, who transported the word "hygiene" into this world
of macros in the first place.

On Wednesday, October 22, 2003, at 05:36 PM, Matthew Flatt wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> At Wed, 22 Oct 2003 16:09:43 -0400 (EDT), Andre van Tonder wrote:
>> (define-syntax define-test
>>   (syntax-rules ()
>>     ((define-test x name)
>>      (define-syntax name
>>        (syntax-rules ()
>>          ((name) (lambda (x y) (x y))))))))
>> (define-test y tester)
>> ((tester) (lambda (x) x) 1)
>> ;========================================================
>> PLT:    ==> let: duplicate binding name in: y
>> Petite: ==> 1
> I agree that 1 is the correct answer, and that's what plain MzScheme
> produces.
> There appears to be a bug in the debugging annotator, though (which is
> why the error message is in terms of "let" instead of "lambda"). I'll
> look into that.
> Matthew

Posted on the users mailing list.