[racket-dev] Enhancement to the syntax system?

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jul 10 10:51:57 EDT 2012

20 minutes ago, Marijn wrote:
> 
> It seems to me that both these results cannot be correct
> simultaneously, but I'll await the experts' opinion on that.

This does look weird:

  #lang racket
  (define-for-syntax (f stx) #`(let ([x 1]) #,stx))
  (define-syntax (m stx)
    (with-syntax ([zz (f #'x)]) #`(let ([x 2]) zz)))
  (m)

evaluates to 1, but if I change the first two "stx" names into "x"
*or* if I change the argument name for the macro to "x", then it
returns 2.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.