> On Aug 17, 2017, at 10:11 PM, Alexis King <lexi.lam...@gmail.com> wrote:
> 
> This is, for
> better or for worse, currently a no-no in Racket — syntax objects
> produced by a #lang’s reader are supposed to only have source locations
> and syntax properties on them, not lexical context.

Supposed to, yes. But AFAIK this is not enforced. If your `read-syntax` 
produces a syntax object with bindings clinging to it, so they remain.


> There are various reasons this can be explained, some historical, others
> technical. One explanation I’ve heard is that valid programs read by
> `read-syntax` are supposed to also be valid programs if read by `read`
> — this means lexical context shouldn’t matter. 

"It's usually not a good idea to have a reader produce syntax objects with 
lexical context. (One reason: binding dependencies are hidden from the 
compilation manager. Another reason: it's easy to trip into a world of 
ambiguous bindings.)" — Matthew Flatt

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to