[m-dev.] io streams

Ralph Becket rbeck at microsoft.com
Sun Dec 26 22:54:49 AEDT 1999


> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> Now that we're not using Prolog, it might be nicer (i.e. more
> concise and not significantly less clear) for each module to
> only module-qualify the symbols from other modules.
> 
> Comments?

I agree.  The use of unnecessary module name qualification is
not consistent in the library or extras.  In particular,
type names are usually not qualified, function names are
rarely qualified and predicate names are often qualified
(although not always, e.g. `require__' is often omitted from
calls to error/1).  However, when I write code I tend not to
qualify predicates defined in a module, even in the interface
section.  Nor do I qualify calls to locally defined predicates;
I use module qualification to indicate that the interface for
a given predicate is defined elsewhere.  One problem with this
is that mtags gets confused (it doesn't understand qualification)
if qualification is used inconsistently - this may mean that mtags
needs changing or that my convention is a bad one.

I think the above `convention' isn't too bad and only rarely
needs tightening up.

One thing, though: I don't like the idea of qualifying
typeclass methods.  To my mind, methods are bound to the
typeclass, which can be instantiated anywhere, not the
module defining the typeclass.

Cheers,

Ralph
--------------------------------------------------------------------------
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