[m-dev.] for review: counter.m

Ralph Becket rbeck at microsoft.com
Fri Mar 10 23:11:36 AEDT 2000


> > The allocate predicate cannot usefully be made into a 
> function, since it
> > returns two items. As long as that is the case, making 
> counter__init into
> > a function would not feel right.
> 
> Doesn't the same argument apply to e.g. queue__init and queue__get?
> Yet we have a function version of queue__init.

Just to stick my oar in, I think it's a good policy to at least have
function versions of all single-mode single-output deterministic
predicates.  Personally, I find functional style easiest to read,
leaving predicate style for genuine relational stuff and multiple
return arguments.

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