[m-users.] When is nondeterminism appropriate?

Volker Wysk post at volker-wysk.de
Mon Feb 15 23:40:30 AEDT 2021

Am Sonntag, den 14.02.2021, 15:32 -0500 schrieb Philip White:
> :- type result ---> ok(T) ; error(string).
> "functions that can fail" (either because of user error or something
> else) seems like the perfect time to use semidet, but if I
> want to have good error messages, then semidet will not help me, and I
> might as well try to make my function deterministic.

This might be a good opportunity for using exceptions.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20210215/a8141b65/attachment.sig>

More information about the users mailing list