[m-dev.] Transitivity of import_module
Peter Schachte
schachte at cs.mu.OZ.AU
Tue Sep 28 12:09:28 AEST 1999
On Tue, Sep 28, 1999 at 03:45:24AM +1000, Fergus Henderson wrote:
> On 27-Sep-1999, Ralph Becket <rbeck at microsoft.com> wrote:
> > One thing that frequently bugs me is that if I import library A that uses
> > stuff from libraries X, Y, Z in its interface, I also have to import X, Y, Z
> > if I want to use those aspects of A.
>
> Transitive imports lead to code that is significantly more fragile
> and prone to breakage when upgrading to new versions of libraries.
Of course, there's a compromise position, which is to allow a module
to explicitly re-export certain items it imports from other modules.
For example, a module that exports a predicate p that returns a term
of type maybe could also re-export the maybe type, so that users of p
would not have to also import the module maybe is defined in. For
this to make sense, the Mercury compiler would need to distinguish the
module an item is defined in from the module(s) it is imported from.
The item's identity would be determined by the unique module it's
defined in.
--
Peter Schachte Men have become the tools of their tools.
mailto:schachte at cs.mu.OZ.AU -- Henry David Thoreau
http://www.cs.mu.oz.au/~schachte/
PGP: finger schachte at 128.250.37.3
--------------------------------------------------------------------------
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