[mercury-users] Why is --infer-all not the deafult?

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Jul 23 17:32:33 AEST 2004


On 15-Jul-2004, Mark Anthony BROWN <mark at cs.mu.OZ.AU> wrote:
> > For example, knowing that L is a list of timestamps tells me nothing about the 
> > meaning of L, that is "the last 10 of times when the user pressed a button".
> 
> :- type click_history == list(timestamp).
> 
> If "click_history" is a good description of the meaning of L, then using this
> equivalent type would definitely help reading as well as writing the code.

Yes.  Also, the type declaration for click_history provides a convenient
central place to put a comment about what click histories are, what they
are used for, and how they are represented (e.g. what is the order of
the list? oldest first or most recent first?).  Good editors support
tags or the equivalent, so any use of click_history becomes a hyper-link
to the type definition.

-- 
Fergus Henderson                    |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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