On Thu, Jul 2, 2015 at 1:28 PM, Niall Douglas
On 2 Jul 2015 at 8:31, Steve M. Robbins wrote:
In your monad application, I have never seen operators || or && mentioned, so there seems to be no reason to adapt names "true" and "false" for the three states. You might as well call them "A", "B" or "C", or to more closely reflect your application: "value", "failure", "internal_error".
Am I missing something?
Hopefully I explained it in my reply to Charley.
I didn't see this question addressed.
A monad has an expected and an unexpected outcome. That naturally maps to true and false.
My mongel monads can also be empty. That implies a ternary state. No one can disagree that the expected state ought to map to true. A valid disagreement is whether empty or unexpected should be false or indeterminate.
I chose the errored/excepted state to be the indeterminate, because I felt that null and value_type states are exactly what they are, but an error_code and especially an exception_ptr is quite literally unknown until you interrogate/rethrow it.
Just my 2 cents, but from that description, I'd map empty to unknown
and failure to false.
Empty means I haven't done it yet, I'll let you know when I know.
Currently it is unknown.
Success means yes I've done it. TRUE!
Failure means no I couldn't. FALSE.
But that's for something like expected