I said earlier that it is theoretically possible to implement hygiene with just macros, but that doesn't mean it's feasible. Implementing hygiene on top of another module system would probably mean implementing another module system on top of that one.
Strawman v2 does not support hygiene "all the way down". That's because syntax-case.scm does not know anything about namespace declarations.
Yes, of course. That's because hygiene and modules are intermingled concepts. I think it is possible to implement a hygiene system, and then a module system above it, but that requires very careful design to let the module system access internals of the hygiene system in a well-defined way.
My short term goal is to design a basic module system that is sufficiently powerful to modularize the Gambit runtime system. Hygiene is not required for that. One thing that is missing is the ability to export record types.
Implementing ability to export record types in general requires that the module system does macro expansion of the code when analyzing modules' exports. Basically, the module system must be able to macro expand things.
If the module system was built on top of a hygiene system or had one itself, this is a rather trivial thing to do, because hygiene systems are in effect a macro-expand function.
Of course I don't want this basic module system to be incompatible with hygienic macros, since that is a worthwhile feature to support.
As I see it, a module system either has hygienic macros, or are in practise incompatible with them. It would be cool to see a counter- example to this, however.
But let me repeat myself... strawman is meant mainly to kick around some ideas and elicit discussion.
Yes. I think it's good at that.
The main question in my mind... what is lacking in this module system to implement other module systems (such as Scheme48's, PLT's, Chicken's, Bigloo's, Guile's)
I don't know all of these systems, but I can for sure say that it's impossible to implement PLT's modules (and R6RS libraries, which are similar) without many more features, hygiene in particular.
Incidentally, this is very similar to how black hole started its life: I wanted something quick that just worked, to be able to organize code. I have since then learned the hard way which features a module system has to have to be practical to use. I quickly realized that I wanted to support define-type records. So I hacked together something for that. After fixing all the bugs, I basically had a very mundane macro expansion function. Later on I realized that hygiene is a very good thing to have. And so on.
From personal experience, I can tell that the approach you are taking will require lots of extra work.
/Per