[clean-list] Comments on the module system
Marco Kesseler
m.wittebrood@mailbox.kun.nl
Sun, 28 Jul 2002 23:23:06 +0200
Hi Brian.
you wrote:
>I'm a strong proponent of nested modules, but I believe that simply
>having qualified imports would be a very useful, simple addition.
and:
>I'm confused, I thought your question was about how to do this with Clean
>now, not how this would work in a hierarchical module system.
I am not wondering how to do this in Clean now. I agree very much
that having some form of qualified names is very useful. I am just
wondering what would be the best way to add them.
In short, I find two things important:
- being able to extend an existing namespace without touching
existing modules.
- avoiding the problem of having to adjust all qualified references
as soon as a definition moves to another module.
So, I have proposed to use something similar to C#/C++ namespaces,
which meet these wishes. I think these are relatively easy to add to
Clean's module system.
At the same time, I have been wondering whether Mercury and other
languages meet both goals in other ways. Until now, it seems that
they do not. The Java solution seems to come close, but has the
problem that package names dictate the location of your sources,
which makes it more intrusive to extend an existing namespace/package.
As to nested modules, I really have no opinion about these. I simply
do not know (yet).
Thanks for the explanations by the way.
regards,
Marco