Boost logo

Boost :

Subject: Re: [boost] PR: Remove safe_bool idiom from boost.tribool
From: Robert Ramey (ramey_at_[hidden])
Date: 2018-05-19 15:53:44


On 5/18/18 10:55 PM, degski via Boost wrote:
> On 19 May 2018 at 00:17, Robert Ramey via Boost <boost_at_[hidden]>
> wrote:
>
>> The motivating concept behind tribool is that of some sort of "extended"
>> bool. The naming suggests that it acts like a bool.
>
>
> I would submit that the name is wrong. From the introduction: " The 3-state
> boolean library contains a single class, boost::logic::tribool
> <https://www.boost.org/doc/libs/1_67_0/doc/html/boost/logic/tribool.html>,
> along with support functions and operator overloads that implement 3-state
> boolean logic." Boolean logic has 2 states, the latter part of the quote is
> a contradiction in terms. Other logic "systems" are applicable:
> https://en.wikipedia.org/wiki/Three-valued_logic
>
> degski
>

Well the word "tribool" may not be defined on the wikipedia page, but it
seems pretty clear to most of what is intended - logic based on true,
false and indeterminant. I don't think renaming things is going to help
things - although it would create a ton work.

Robert Ramey


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