Namespaces Andre van Tonder (14 Aug 2005 15:32 UTC)
Re: Namespaces Marcin 'Qrczak' Kowalczyk (14 Aug 2005 18:48 UTC)
Re: Namespaces Martin Gasbichler (14 Aug 2005 19:21 UTC)
Re: Namespaces Andre van Tonder (14 Aug 2005 20:14 UTC)

Namespaces Andre van Tonder 14 Aug 2005 15:32 UTC

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.

On the other hand, if there is a single namespace, we will get an "Identifier
out of context error".  This is the answer that both Chez and MzScheme give.

However, while Chez has a single namespace and is therefore self-consistent,
I'm not sure that MzScheme is consistent on this issue, since MzScheme already
does have separate namespaces for transformer and runtime environments in the
case of toplevel bindings.  Am I overlooking something?

Cheers
Andre