[mercury-users] Idea for another handy convention (preds, this time).

Dominique de Waleffe ddw at miscrit.be
Thu Jul 27 21:03:10 AEST 2000


> How many on this list make use of automatic mode inference, rather than
> supplying explicit modes for preds?  Personally I suspect I'd find it
> quite hard to understand code including multi-output predicates that did
> not supply mode declarations for them.

I've used the possibility to speed up the code writing.
I let the compiler do the inferences then had Emacs splice in the
declarations
extracted from the compiler messages.

This was less then perfect since the inferences did not use the "correct"
types
in case of type aliases. Plus we're using a pre-processor which makes us
loose
track of line numbers so, my patching code could not rely on the messages
anymore...

> I know this sort of thing led to
> all sorts of grief with inadequately documented predicates when I worked
> on a very large, multideveloper Prolog project.

Same experience....That's why I systematically spliced in the inferenced
made by the compiler.

D.

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