[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Namespaces

This page is part of the web mail archives of SRFI 72 from before July 7th, 2015. The new archives for SRFI 72 contain all messages, not just those from before July 7th, 2015.



Andre van Tonder <andre@xxxxxxxxxxxxxxxxx> writes:

> I have been wondering about the following technical issue:
>
>    (let ((x 1))
>      (let-syntax ((m (lambda (form)
>                        (let ((x 2))
>                          (syntax x)))))
>        (m)))
>
> There are two possibilities for what this should give, and I am trying
> to decide which would be the Right Thing.  If we regard transformer
> and runtime varables to live in separate namespaces, the (syntax x)
> will refer to the outer binding, and we will get the answer 1.

I don't think this has anything to do with namespaces. The variable
generated by (syntax x) and the binding introduced by the LET live in
different phases (or stages). Hence they must not interfere.

The syntax-case model is like an interpreter whose source code
bindings interact with the variables of the interpreted program.

-- 
Martin