[plt-scheme] datum->syntax rules

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Tue Aug 5 00:58:25 EDT 2008

YC wrote:
>
> In that case, why does the first version work?  Does #'_ sometimes 
> binds against the identifier and sometimes not?
>
No, #'_ never binds against the identifier. Your first version is 
exactly the same as

(define-syntax (if-it stx)
  (syntax-case stx ()
    ((_ test then else)
     #'(let ((it test))
         (if it test else)))))

With is the same as

(define-syntax (if-it stx)
  (syntax-case stx ()
    ((_ test then else)
     #'(if test test else))))

I can only say you confused yourself.

Chongkai

> Thanks,
> yc
>




Posted on the users mailing list.