[Modules] Naming

Henrik Gedenryd h.gedenryd at open.ac.uk
Tue May 7 11:55:59 UTC 2002


Stephen Pair wrote:

> In looking at the Module code, it seems that there is some confusion
> over the nature of the Module hierarchy.  In certain circumstances, it
> seems that the hierarchy implies more than just a naming mechanism (i.e.
> if you unload a module, it automatically unloads the submodules by
> default).
> 
> I think I'm of the opinion that the purpose of hierarchy should be
> strictly confined to naming.  There should be no other relationship
> between modules and submodules implied by the name hierarchy whatsoever.

> In fact, it would probably not be useful to think in
> terms of modules and sub-modules at all.  But rather, they are all just
> modules, some of which may have elements of their name in common.

Do you really not think that it is useful to think of systems as being
composed out of other subsystems? For example, vm-building consists of
building the interpreter and stuff, but also of building plugins. And
Morphic consists of subsystems and so on.

I think this is especially important with systems as complex as Squeak.

The parent-submodule relation is just a way of capturing that natural
hierarchical structure. Without this, the parts of Morphic would be no more
related to Morphic than to the Collection classes for instance.

> Names should be resolved by looking within the current module and any
> imported (and consequently pre-requisite) modules without regard to the
> name hierarchy. 

That is currently how it works; submodules are just a special kind of "used"
modules: SubmoduleReference is a subclass of ModuleReference. So it doesn't
actually involve the name scheme.

Henrik





More information about the Squeak-dev mailing list