Previous: Known Names, Up: Reflection
Ever since the introduction of the module system, there has been a great deal of confusion and gnashing of teeth due to the non-existent line between what should be considered internal and what should be considered external. There was no well-defined programming interface; everything was visible and it was easy to shoot yourself in the foot.
Starting with Guile 1.4.2 [actually, 1.4.1.99 to be precise –ttn] module system internals are for the most part properly hidden. For example, the command:
guile -c '(use-modules (ice-9 session)) (apropos "module")'
no longer shows four dozen bindings irrelevant to the programmer. It is still possible to shoot yourself in the foot but now the mechanisms are fewer in number and better documented. (Likewise with mechanisms not resulting in foot-shooting.)
This chapter describes how to access the module system internals in three ways: two through a module interface (one old, one new) and one through the fixed set of global bindings (old).
The new approach is generally preferable for the same reason that using modules is preferable to not using modules: precise control of the client interface, while the old approach is provided to ease migration. A program can use both approaches simultaneously, with some slight restrictions.
See Creating Guile Modules, and See Using Guile Modules, for usage not requiring access to the internals.