
@mflatt
If I have:
(list
(let ([c '1]) (let ([c '3]) ...))
(let ([c '2]) ...))
where [c '1]
is pink, [c '2]
is orange, and [c '3]
is both pink and orange, would there conceptually be ambiguity on resolving pink and orange? (I know your algorithm wouldn’t find an ambiguity)

I would say there’s no ambiguity, and it might even be sensible if the list
expression was the expansion of some syntactic form with overlapping but non-nested scopes.

Thanks!

I’m trying to understand why it’s OK to use empty-env
here, and would empty-env
suffices if we need to support syntax-local-value
.

The little model here has no for-syntax
imports or any compile-time binding, so every let-syntax
right-hand side is in an empty environment. To support syntax-local-value
, you need some way of accessing the environment at the point where eval-for-syntax-binding
was called (maybe through a continuation mark, which is how the actual implementation works), but you still wouldn’t pass that environment to expand
.