On 14-Jan-09, at 1:14 PM, Per Eckerdal wrote:
I'd say the simplest way to achieve this is to provide a renaming mechanism, i.e. (import (foo-module (rename (bar bar1) (baz baz1))).
My module system currently lacks this feature, but I'm planning to implement it sometime. The problem we were discussing is related to the naming of modules, not the things modules export.
The problem will arise for instance if you have two modules called "util". If both modules use the "util" namespace, and export the function "foo", the function will be called util#foo internally. If you load both modules into one Gambit process, one of the functions will overwrite the other. Renaming on import doesn't help here.
That's why namespace prefixes can be composed, i.e.
(##namespace ("eckerdal#utils#" append!)) (##namespace ("feeley#utils#" sort!))
It is just the usual hierarchical nesting idea.
Marc