[mercury-users] query

Ralph Becket rafe at cs.mu.OZ.AU
Tue Mar 18 22:13:32 AEDT 2003


Okay, I'm in agreement with Michael that module qualification is
something to be used judiciously.  My opinion is that maximum
readability is achieved by
- not qualifying types or functions, except where the module name
  provides useful information that is not present in the `basename'
  (e.g. map.init/0),
- qualifying all predicates, except possibly those with no outputs such
  as int.</2 and predicates defined in the same module.

The tutorial not only has to avoid confusing the reader, it should also
sell the language to the initially skeptical.  My strategy here is to
qualify pretty much everything to start with, then wean the reader back
to the formula above once they start to feel comfortable with the core
language.

I don't think that avoiding qualification wherever possible is a good
idea.  For instance, we frequently use name overloading, but with
different modes and argument orderings.  Qualifying predicates makes it
easy to find out what is going on in such cases.

	Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list