Email list hosting service & mailing list manager

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)

Re: Namespaces Marcin 'Qrczak' Kowalczyk 14 Aug 2005 18:48 UTC

Andre van Tonder <xxxxxx@now.het.brown.edu> writes:

>    (let ((x 1))
>      (let-syntax ((m (lambda (form)
>                        (let ((x 2))
>                          (syntax x)))))
>        (m)))

Although I don't have yet a complete picture of the right hygienic
macro system in mind, I'm pretty sure that identifiers from different
levels should live in separate namespaces.

Syntax-rules blurs this because it doesn't have explicit unquoting,
and a bare symbol in a syntax quotation denotes either the source
level identifier or a place where a piece of syntax is substituted,
depending on what definition is in scope. I don't like this.

With explicit unquoting there is no reason to put them in the same
namespace. It's always known which level is meant, so putting them
in the same namespace only introduces errors when they are shadowed.
You can't refer to a runtime entity from macro code nor vice versa.

The only thing which gives me uneasy feeling is that macros themselves
are meta-level entities bound to names from the runtime namespace.

Disclaimer: I never really used macros in practice.

--
   __("<         Marcin Kowalczyk
   \__/       xxxxxx@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/