[gambit-list] Generalized namespaces into aliases

atsmyles at rcn.com atsmyles at rcn.com
Sat Sep 29 18:24:28 EDT 2007


Normally in scheme you have one namespace like this:

name -> <location>

The location can contain either a macro or a value. The identifer-macro in R6RS is like an ordinary macro except the the input form is an identifer. In that case you would have:

name -> <identifier-macro transformer>

An alias works differently, It is more like a pointer to another name. It doesn't directly point to a location in memory. So for an alias like

(aliases (alias name))
 
would create a structure like:

alias -> name -> <identifer-macro transformer>

This is also how namespaces work in gambit currently, except in this syntax you specify the mapping explicitly. So

(namespace ("test#") hello) is equivalent to 

(aliases (hello test#hello)).

Arthur

>> The idea is that a user can create aliases that are resolved before  
>> looking up functions or macros.

>This looks a lot like symbol macros in Common Lisp or R6RS.  >How do the two systems compare?

Brad



More information about the Gambit-list mailing list