I think pollen uses racket's compiled directories to store some of its own 
cached/generated code, maybe a similar technique could be helpful for you.

Do you want to create submodules for arbitrary modules or only for modules 
using a certain library or language?
When its the latter I think its a community coordination issue.

I can understand wanting to encapsulate everything but it seems that module 
names are expected to be public interned symbols in the current 
implementation:
https://docs.racket-lang.org/reference/Module_Names_and_Loading.html?q=module#%28def._%28%28quote._~23~25kernel%29._make-resolved-module-path%29%29
"A resolved module path is interned. That is, if two resolved module path 
values encapsulate paths that are equal?, then the resolved module path 
values are eq?."
I think gensyms are not allowed, because they are not interned.

I also would find it interesting to have something functor like, in the 
sense of being able to create parameterized module instances.
My guess is that constructs like that are difficult to optimize and the 
separation between runtime and compile time can become extremely blurry.
To the point that certain dynamic constructs would cause big chunks of code 
to become ready for compiling at run-time only and at that time an 
interpreter might be faster.

These are just my intuitions, I have only limited experience with modules 
and functors with my own toy language experiments.

Maybe if you need very dynamic/custom behavior, instead of generating 
module files:
You could create a program which creates and evaluates certain in memory 
generated module-forms at runtime, attaches them to a namespace and then 
runs the other code with that namespace.
Allowing that code or your library to require and interact with the 
dynamically generated module.

So far my namespace usage was limited to attaching certain modules, but I 
think this is possible.
Think of it as a custom program launcher that acts like a 
"scripted"/automated interactive repl session.

Simon

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/be993550-da25-496b-abcb-705db0473a28%40googlegroups.com.

Reply via email to