[clean-list] Comments on the module system
Brian Rogoff
bpr@artisan.com
Tue, 23 Jul 2002 14:53:19 -0700
Marco Kesseler writes:
> Hi Brian,
>
> > One of the things that's (sorely, IMO) missing from the Clean module
> >system is qualified names, where you refer to the identifiers in a module
> >using ModuleName.identifier or some equivalent syntax.
> >
> > Another issue that I've mentioned is the lack of hierarchy. Even
> >rather pathetic (compared to Clean) languages like Java have hierarchical
> >namespaces and I think it's a good idea.
>
> In principle I agree that it is a good idea to have namespaces of
> some sort,
> but I seriously doubt whether namespaces should be related to module
> names
> and module hierarchy. This will lead to trouble when one starts
> rearanging modules.
If you mean that hierarchical namespaces shouldn't map to filesystem directory
hierarchy, I agree. However, I think modules should define scopes. Think of
the ML module system without functors, or Ada packages without generics.
Mercury, which is a kind of cousin to Clean, is a good source of design
ideas here (though I prefer separate interface and implementation modules
like Clean and Ada). A pretty simple hierarchical module system with
either qualified or nonqualified names. Even without separate submodules it
would be useful.
-- Brian