On Jan 14, 2009, at 9:27 AM, Christian Jaeger wrote:
- as mentioned above, for debugging (both system interoperation and at
the repl) it would be nice to keep module name and namespace "close", like, module named "foo" in your module system might get namespace "pe-modsys:foo#".
I'm also thinking that a function in Gambit to list all identifiers in a particular namespace would be good to have (easy to write as a filter on all symbols, anyway; maybe it should be made scalable by using trees though).
Indeed, it would be good for the module system to provide introspection utilities. However, I don't think the technical implementation of the system should be influenced by "debuggability". It should take whatever approach is easiest/sensible/appropriate, and provide debugging tools to interact with the system. So if I wanted to look up a symbol, I would do (module-ref foo-mod "bar") instead of foo#bar. My two cents anyway.
(Again, you didn't say how you avoid *name* clashes; but as mentioned, agreed on that the system chooses the namespace.)
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))).
Can't wait to play around with this module system. I'm glad we're discussing this again; I haven't worked on modules for a while and this makes we want to get back into it.
- James