[m-dev.] Module qualification of typeclass methods

Simon Taylor stayl at cs.mu.OZ.AU
Fri Nov 23 02:41:56 AEDT 2001


On 22-Nov-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> On Wed, Nov 21, 2001 at 12:10:39AM +1100, Simon Taylor wrote:
> > If the System.Data.{SqlClient,SqlTypes,OleDb,Common} modules are all used
> > then `:- import_package System.Data.*' might be appropriate, but I
> > shouldn't be tempted to import everything just to use some of the
> > basic classes (DataColumn, etc.) in System.Data. `:- auto_import'
> > should be used to import the modules for the basic classes.
> > 
> I would argue that this is a packaging problem.  The .NET library
> designers decided to put all these classes into one deployment unit
> (assembly).
>
> I would argue that the namespace pollution issue is due to bad library
> design, rather then a problem with the import_package declaration.

I would argue that it's a bit of both.

Any extension to the module system should gracefully handle libraries
which aren't organised in the ideal way (whatever that is).
As this example demonstrates, `:- import_package' does not.

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