Boost logo

Boost :

Subject: Re: [boost] [variant] Maintainer
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-06-28 12:17:34


On 28 Jun 2015 at 18:03, Bjorn Reese wrote:

> >> Empty => False
> >> Value => True
> >> Errored/Excepted => Indeterminate
>
> It seems more intuitive to me if Empty returns Indeterminate and
> Errored returns False.

In a Kleene logic, false < unknown < true for AND, so for variant if
you wanted error && empty to equal empty, you'd choose the scheme
above. If you wanted error && empty to equal error, you'd choose your
scheme.

For lightweight monad and future, I've gone for empty being dominant.
This was not an easy choice to make, and I am still unsure if it is
correct.

For variant it's that much harder again. I am currently totally
undecided personally on that one.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk