[plt-scheme] syntax and promises and possibly phases

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon May 19 15:26:01 EDT 2003

At Mon, 19 May 2003 15:04:46 -0400, John Clements wrote:
> I'm guessing that I'm confused here, but can't we achieve the same 
> result with 3D code?  Even in a module? Is this an instance of the same 
> thing? 

Yes, your code is an instance of the same thing.

>    (define-syntax (remember stx)
>      (syntax-case stx ()
>        [(_ expr)
>         (let ([b (box #f)])
>           #`(let ([b #,b])

#,b impies `datum->syntax-object' on the box containing #f, which
creates a syntactic box that doesn't share with the source box.

This is just like #,'(1 2), which creates a syntactic list that doesn't
share with the quoted list. Pairs, vectors, and boxes are treated
specially by `datum->syntax-object'. Everything else counts as atomic
(and if it isn't actually atomic, it's "3D").

Matthew



Posted on the users mailing list.