[m-dev.] module system discussion

Peter Ross peter.ross at miscrit.be
Wed Dec 12 22:24:17 AEDT 2001


On Tue, Dec 11, 2001 at 11:51:25PM +1100, Simon Taylor wrote:
> On 11-Dec-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 30-Nov-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > > 
> > > I'm not proposing the `:- transparent_module' extension just
> > > for .NET. I am arguing that it is generally good style to qualify
> > > class method names with the class name, and that it is worth adding
> > > a small extension to the module system to make that more convenient.
> > > This hasn't come up before because we haven't used typeclasses much
> > > before, and especially not in large module hierarchies.
> > 
> > Wouldn't ordinary nested modules and `:- use_hierarchy' suffice,
> > both for Mercury type classes, and for interfacing with .NET?
> 
> I don't think it's OK to have to `:- use_hierarchy System'
> to use the classes defined at the top level.
> 
> The sloppy solution (import everything) should not be the only
> practical solution.
> 
I agree.  I find the idea of importing everything to be sloppy.
transparent sub-modules give one a more refined control of the
importation which is useful when some subpart of the module hierarchy
conceptually belongs together.
--------------------------------------------------------------------------
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