[m-dev.] Module qualification of typeclass methods
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Nov 20 23:02:04 AEDT 2001
On 20-Nov-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> On Tue, Nov 20, 2001 at 08:28:11PM +1100, Fergus Henderson wrote:
> > On 30-Oct-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > > Simon wrote:
> > > > Would it be better to add an `import_package' declaration, which
> > > > is like `import_module', but also imports all sub-modules of the
> > > > imported modules.
> > >
> > > This could be problematic when you have a very large hierachy of sub
> > > modules. For instance if you want to use the System namespace in .NET you
> > > would also have to load in all the children namespaces. This would be huge,
> > > so maybe it is not such a great idea because it could lead to too much
> > > importing.
> >
> > I'm not sure what problem you're worried about here.
> > Is it namespace polution, or efficiency?
>
> I was worried about efficiency.
If efficiency is really a significant problem,
users can use more precise declarations than
a single ":- use_package 'System'.", e.g.
:- use_package 'System__Data'.
:- use_package 'System__Reflection'.
> So in summary I don't think it is a valid objection anymore.
Good.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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