[plt-scheme] Re: side effects in R6RS modules

From: Michele Simionato (michele.simionato at gmail.com)
Date: Sun May 3 11:46:56 EDT 2009

On May 3, 4:53 pm, Chongkai Zhu <c... at cs.utah.edu> wrote:
> Why the dirty trick?

Maybe because it was early in the morning and I was
half asleep?

> This works:
> (define-syntax define+
>   (lambda (x)
>     (syntax-case x ()
>       ((define+ name value)
>        (begin (register #'name)
>               #'(define name value))))))

Yes, now the script compiles and behaves as I would expect
(even in Larceny).
Still, I would be curious to know why I did not compile in PLT
in the first version and why it registered the identifiers
twice in Larceny.

Posted on the users mailing list.