[m-users.] When is nondeterminism appropriate?
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...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the users