[m-dev.] module system discussion
Simon Taylor
stayl at cs.mu.OZ.AU
Thu Dec 13 18:40:13 AEDT 2001
On 13-Dec-2001, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> As I understand it, transparent submodules are used (a) to get around name
> clashes and (b) where the *designer* of a module *expects* that the common
> case will be for a user to import the submodules whenever he imports the
> parent module.
The idea of transparent sub-modules is that from the user's point of view
they do not introduce a module hierarchy. The items in the transparent
sub-module are treated as if they were defined in the parent module,
just with an extra qualifier.
> A module hierarchy implemented using transparent submodules removes
> choice from the user, offering only convenience being that the user can
> use plain `import' rather than `import_hierarchy' on the parent module.
>
> It is this loss of choice (and the opportunity for abuse) that puts me
> off transparent submodules.
The choice that is removed is a choice that the users are very unlikely
to want. Have you ever wanted to explicitly import every type and
typeclass that you use? What I want is a level of control in between
explicitly importing every used type and typeclass, and just importing
the entire hierarchy.
I don't see much opportunity for abuse for this feature.
Simon.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list