Boost logo

Boost :

Subject: Re: [boost] Ternary logic programming (was: Re: [variant] Maintainer)
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-07-02 22:02:52

On 2 Jul 2015 at 13:38, Gottlob Frege wrote:

> > 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.

Alright, that's like four people now with the same opinion. I'll
change it.

BTW option<T> will now have the tribool states of true and unknown
only. For the boolean conversion, that maps to true and false, so
if(!option) handle_empty; works.

Thanks for the feedback everyone.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at