Boost logo

Boost :

Subject: Re: [boost] Ternary logic programming
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2015-07-03 06:09:44


I believe boost::tribool addresses exactly this point.

- Rob.

On 3 July 2015 at 10:45, Bjorn Reese <breese_at_[hidden]> wrote:

> On 07/02/2015 02:49 AM, Niall Douglas wrote:
>
> Out of interest, what do you think of my free function ternary logic
>> programming:
>>
>
> So far, the discussion has focussed on how the ternary operators should
> behave in if-statements. In that case, I tend to agree with Lee's enum
> and switch suggestion, which also extends well into multi-variate logic.
>
> If we want to use the ternary logic in if-statements, then we should
> address composite conditions. For instance, what should the following
> evaluate to?
>
> if (Empty && Value) {}
>
> if (Empty && Error) {}
>
> if (Empty && Empty) {}
>
> The question really boils done to what influence Empty has. Do we want
> it to influence the results, or should it act like a "don't care" value?
>
> PS: Niall, I know that you are currently using Kleene logic, but I think
> that it is worthwhile to consider the use-cases before selecting the
> truth tables.
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
ACCU - Professionalism in programming - http://www.accu.org

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