[m-dev.] Re: [mercury-users] Module qualification of common operators (was RE: [m-rev.] Updated posix patch)

Ralph Becket rbeck at microsoft.com
Wed Jul 18 19:59:40 AEST 2001


> From: Zoltan Somogyi [mailto:zs at cs.mu.OZ.AU]
> Sent: 17 July 2001 05:50
> 
> As some who looks at other people's code reasonably often, I find that
the
> module qualifiers help me significantly. They make it easy to see what
data
> structures the code is working with, without requiring me to look at
the data
> structure declarations, which are usually a fair way from the code.

There is certainly something to be said for annotating certain specific
calls with their module name, but for many classes of type (collections,
dictionaries etc.) there exist a standard set of operations for which I
think module qualification just makes things more longwinded without
improving readability.

> I think this is in large part an original writer vs maintainer issue.
Module
> qualifications may be clutter for the original writer of the code, but
they are
> useful signal to a maintainer. Given that even original writers turn
into
> maintainers sooner or later, I think we should help maintainers first.

I agree in general, but differ w.r.t. map, fold, append etc.

If the next version of the standard library is more heavily type class
based then we'll quite likely see less qualification of calls anyway...

- 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