[plt-scheme] Parameterizing Modules with variables
I'm just now getting around to using modules. Up to this point, I've
been glueing my program components together with good old load. So, I
learned about not being able to "set!" an item exported by a
module. Fair enough. However, up to this point my program components
have been a collection of function definitions, and sometimes, global
variables which can be used to tweak the behaviour of the
functions. Well, it seems the module paradigm is incompatible with
this style of component. I'm afraid that the recommended solution is
going to be to wrap the variables with get and set functions, and
export those... Anyways, take Emacs for example. Above the C level,
it's just a collection of ".el" files all contributing to one big
happy namespace (AFAICT). Many of these components are configurable
via variables. If one were to construct an Emacs in a language with
modules, it seems their use would preclude this style of configuration
via variables. I.e., suppose someone built comint.el as a module. What
happens to all the "comint-*" variables.
Comments, hints, and roadmaps towards enlightenment are appreciated.
(module ed mzscheme (require hint))