[mercury-users] false/fail Re: failure warning
Peter Moulder
Peter.Moulder at infotech.monash.edu.au
Thu Aug 21 16:28:44 AEST 2003
On Thu, Aug 21, 2003 at 03:39:55PM +1000, Ralph Becket wrote:
> Peter Moulder, Thursday, 21 August 2003:
> > In fact in the first version of the patch I did write `false' instead of
> > `fail': I think it better to encourage people to think logically with
> > `false' than imperatively with `fail'. I think `false' should become a
> > builtin synonymous with `fail'.
>
> false/0 *is* defined in the builtin.m standard library module.
I may have misused the word builtin above. I was trying to suggest that
false be implemented the way `fail' is, as an empty disjunction rather
than a predicate.
Regardless of the implementation, the intent is that there be no
disincentive to using `false' instead of `fail'. Currently, `false'
produces more warnings than `fail'. false->fail made the difference
between submit_patch failing or succeeding for the array.m patch.
There's also a psychological disadvantage if one isn't sure that there
are no additional costs to using `false'.
pjm.
--------------------------------------------------------------------------
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