220 35329 <CACCwyzfyH+v6ih1+fx6SpAAngGGVotoTskHpQSTxLNkjpx-x1Q@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: G34R Studio <g34rst@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Other boolean type
Date: Sat, 11 Nov 2017 14:03:48 -0200
Lines: 109
Approved: news@gmane.org
Message-ID: <CACCwyzfyH+v6ih1+fx6SpAAngGGVotoTskHpQSTxLNkjpx-x1Q@mail.gmail.com>
References: <3ab3afca-0676-4c57-9d76-a0c934f3d2bd@isocpp.org>
 <ou4bfs$r3c$1@blaine.gmane.org> <411edc39-7113-9ab8-603d-f661bd21efd4@mail1.stofanet.dk>
 <d964ddfe-cc61-42be-a818-6ca43cdc6235@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a113bc5b0ce5de3055db72ef1"
X-Trace: blaine.gmane.org 1510416229 28827 195.159.176.226 (11 Nov 2017 16:03:49 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 11 Nov 2017 16:03:49 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCTMTZ5B5IERBZN6TTIAKGQEEFLAEPI@isocpp.org Sat Nov 11 17:03:44 2017
Return-path: <std-proposals+bncBCTMTZ5B5IERBZN6TTIAKGQEEFLAEPI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ot0-f199.google.com ([74.125.82.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCTMTZ5B5IERBZN6TTIAKGQEEFLAEPI@isocpp.org>)
	id 1eDYG0-0007EM-1Q
	for gclcip-std-proposals@m.gmane.org; Sat, 11 Nov 2017 17:03:44 +0100
Original-Received: by mail-ot0-f199.google.com with SMTP id s12sf2451038otc.5
        for <gclcip-std-proposals@m.gmane.org>; Sat, 11 Nov 2017 08:03:51 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1510416231; cv=pass;
        d=google.com; s=arc-20160816;
        b=FPiv8jpHWZtLPhhi/P76XwDoEmaspP0cM7E9k3SIjxJearDhhftkxs2jSrmw14Jnar
         lx+Qmw5HgE5IkepmemPurF4thHeJPWlx4fSijiMhy8faZEtaEOo6i6aRivu9vv53Nn5q
         kTsTKC79mcKNE0L4cnH+3v1Ma87yt7YFEfuarA/H5wJSJr+lfZ5slt1l37x4rgTcN7ZF
         1E5NDfMxO3+hzgRgw1+QdpdUy3r5MBrTmwi9lMGHPezdl2Rcx+MIDH8F1Usfr1fqEgv0
         0hz0j6mlSr85SorPnnr0Z9y4d01tXograCROBR094Wg6JRepCyxPeM0OJ4IMnT7s4Sfz
         WhNg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=T5xF65j0MmXQqc119lr9EIXVGsuIdoBwYx6lUlITvM8=;
        b=jxvPD8ZWs9lY8ck3TwL7OeDQqYNKjV4nBlmI8O+HMqbiaqXE9VAMjkks2yMJqqtUqd
         DRCB4ocjWf3kE3jxw1aWOGnpiqT/Tzzb9BwdmRDVzPSYsZPpDGJKcnMhkIkfPTbgMu/o
         BFNUtg1Svb+120jnbKvH2XyYJ35Mm65LD1nzGOlsArWM/jzDsnmaYY3nBTmwzIV7itM3
         9iX38Chg0JCfXtcqGvd5D5RLEWUy/qsR8a4QwKtTTGfp4AnGrkvUosUHQCBWcngBcysr
         0noTjod/OVtdwvAAY/e3NhrpNRUAErzG9XconnuSks2qWeo7ziGA9ga/JBisrPErgwTv
         WAUg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=pZsjkunU;
       spf=pass (google.com: domain of g34rst@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=g34rst@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=T5xF65j0MmXQqc119lr9EIXVGsuIdoBwYx6lUlITvM8=;
        b=yS2jn2eMVb87PGywS+tFqso4NJn1HiDe6v3QStBNNOp27exe90tFZxpqkDwANydLSE
         GXkygSwNL7Vdjpppu2IXZO7pAuVOW37MtpeNQD0S75fIaBqbzfBYJqIHQhu8WMSV3T3M
         e1MbREuWMiAFWRnJLz9th3vOhcHvjOYSxuv3W+NShsJsvQykvOUEckY+kGa/AEi90IHs
         LlzKwmAhAQUUEEI90VTx+/r9BfcMsU24aRQqpck1p90YxCNivclwRzHmAQulkUibk0nE
         9fDCBVNSHxwp9GnPFcVYZmK4GhhsXRKNMrStQEvjecFfD+z3DtaexholRbJjOPGwgRdg
         onXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=T5xF65j0MmXQqc119lr9EIXVGsuIdoBwYx6lUlITvM8=;
        b=omKVx9DXd0Msa+Sucar71badtEfqACcu8TZvsKsa26c6HbHSpUGMcH5KGdfeSUWjfV
         aIqKiD1m034FtAN9vG0c+1h1nf6+98Gr1+gY+1QNEAuAb3cWRaGL44a1nsoCiPcl4Q2Q
         8285UU9oOA78EJYpz61/7dzN2Jp68slymnT5HRfhzXRwv9vvFtakxr/KbPhgMRgYB/kA
         gvXlUZpFbfCt6Voz04x31cuVBYd2AXd3gw1tkZMSG08pVK4q7HHk+zKu0G85d+JniAUh
         xiuUTTuDZg+B4S6Qd0hQ39Wqf3zDTmnDEFaEStDIl8FeLSeZoZbtHbxT3nBNHeRJZ/Ec
         PpYw==
X-Gm-Message-State: AJaThX6OrnUfbSwV3qgttmH5F2Ka2s1l4mwFcZJJ4R0ZdB40DsVzoAEH
	Fu6TqbGz7MYVcfpXCAtfIXdDnw==
X-Google-Smtp-Source: AGs4zMZj3HUI8L02pQMx8sK1A4jjjvJnVjmacEZc1F6C/eWGjzOMKJciZyGq6Ycvw4Hnfr6zf98tXQ==
X-Received: by 10.157.49.41 with SMTP id e38mr7141385otc.8.1510416231034;
        Sat, 11 Nov 2017 08:03:51 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.20.204 with SMTP id r12ls2409040otr.22.gmail; Sat, 11 Nov
 2017 08:03:49 -0800 (PST)
X-Received: by 10.157.12.1 with SMTP id 1mr2796039otr.234.1510416229697;
        Sat, 11 Nov 2017 08:03:49 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1510416229; cv=none;
        d=google.com; s=arc-20160816;
        b=xQHBwdn6E2Vue0dP94gV9qaq7n6PgRbECXDE9SVCyF3KgWus+ybCIkhmPcoA++LGZc
         1qg9Gwdn90JjLriQQPRohqMPmtpQ6fyhL14UlGEFN85cm68pNLafpSpT2HaVmtLOhuid
         auYx3M4z72Tq44hjNWLoYHnO3ZbmSMTvbGE9LF1YCegZi3POngItHp6+6VSXHIVsKyki
         ssebirRaqeQpjLYU4dYFSst3EZ0PdwNLDPqT5Yu5Q/p8JLYDQO8qlFqapFrq9/FV1jRm
         HGzrcsuWuEeze6hRqcW9qSinsAg0Up+i7T8yKxFqIhznYdGKLQBDWtbWIvf9ZnfPNX8O
         8L5Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=+Ui2kL9Lk/sgtCAML8zwBUWnyeQMPiqMwgZN83c6DB0=;
        b=OrtottJWMMeksMB0uQoJrW6cCsZpYW35561ZuwH8ln08YZMJRle0qOtw1EhirryySd
         rpgANQ6l1ZP2SFCBfYgKN47tL3mFNiFvJjB8ZF+UgOI9+eHXZqma3g1+g0ulG0VPxXYD
         jST5U71q13lxtIRRmN6FGa+PGhGSJUSqoRIhnlHN7FvdGx+VDEjhlOpLTs0XpbW9zVpC
         +0+uQevfvriBWKnhVWbe4FtjdwM7WkPx3tz93Cjo8A/C4rnrNUfw6X2trGQ5YJcC3LPc
         jtvyTxs80s1J/PV1qdGBDr07x5dAPleGGwkXft8bOqQ0JTplAyPNeyt11ttaLgCLMSSH
         Gz6Q==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=pZsjkunU;
       spf=pass (google.com: domain of g34rst@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=g34rst@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id l10sor4520090oth.75.2017.11.11.08.03.49
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sat, 11 Nov 2017 08:03:49 -0800 (PST)
Received-SPF: pass (google.com: domain of g34rst@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.157.32.74 with SMTP id n68mr3035150ota.50.1510416229226;
 Sat, 11 Nov 2017 08:03:49 -0800 (PST)
Original-Received: by 10.74.92.144 with HTTP; Sat, 11 Nov 2017 08:03:48 -0800 (PST)
Original-Received: by 10.74.92.144 with HTTP; Sat, 11 Nov 2017 08:03:48 -0800 (PST)
In-Reply-To: <d964ddfe-cc61-42be-a818-6ca43cdc6235@isocpp.org>
X-Original-Sender: g34rst@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=pZsjkunU;       spf=pass
 (google.com: domain of g34rst@gmail.com designates 209.85.220.41 as permitted
 sender) smtp.mailfrom=g34rst@gmail.com;       dmarc=pass (p=NONE sp=NONE
 dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:35329
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35329>

--001a113bc5b0ce5de3055db72ef1
Content-Type: text/plain; charset="UTF-8"

or the third state could be a not a number, since the state is undefined

Em 11/11/2017 13:08, "Nicol Bolas" <jmckesson@gmail.com> escreveu:



On Saturday, November 11, 2017 at 4:32:37 AM UTC-5, Bjorn Reese wrote:
>
> On 11/10/2017 09:16 PM, Brittany Friedman wrote:
>
> > As I understand, boost tribool uses Kleene algebra. Personally I have
> > found Lukazsiewicz easier to understand and more useful.
>
> I have found that it depends on the use case:
>
>    http://breese.github.io/2015/07/05/layers-of-three-valued-logic.html
>
> > The point of this post was to point out that any proposition of creating
> > a tribool needs to have a very clear idea of what this third state
> > actually means.
>
> Absolutely agree.
>

I would go even further. No tri-state boolean type should be named anything
as simple as `tribool`. The name of the type should clearly indicate what
the third state means. Like a `maybe_bool` or an `invalid_bool` or whatever.

Or even better, we could have a `tribool` template that is given an enum
defining the three states. The 0 value must be false, the 1 value must be
true, and the 2 value must be the third state. And the template could have
extension machinery so that the user can define 3rd state comparisons (true
and false comparisons always work as expected).
....

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACCwyzfyH%2Bv6ih1%2Bfx6SpAAngGGVotoTskHpQSTxLNkjpx-x1Q%40mail.gmail.com.

--001a113bc5b0ce5de3055db72ef1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div style=3D"orphans: 2; widows: 2;">or the third state =
could be a not a number,=C2=A0<span style=3D"background-color:rgb(255,255,2=
55);color:rgb(33,33,33);font-family:inherit;font-size:21px;line-height:24px=
;white-space:pre-wrap">since the state is undefined</span></div><div style=
=3D"orphans: 2; widows: 2;" dir=3D"auto"><span style=3D"background-color:rg=
b(255,255,255);color:rgb(33,33,33);font-family:inherit;font-size:21px;line-=
height:24px;white-space:pre-wrap"><br></span></div><div dir=3D"auto">Em 11/=
11/2017 13:08, &quot;Nicol Bolas&quot; &lt;<a href=3D"mailto:jmckesson@gmai=
l.com">jmckesson@gmail.com</a>&gt; escreveu:</div><div dir=3D"auto"><div cl=
ass=3D"gmail_extra" dir=3D"auto"><div class=3D"gmail_quote"><blockquote cla=
ss=3D"quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-=
left:1ex"><div dir=3D"ltr"><div class=3D"quoted-text"><br><br>On Saturday, =
November 11, 2017 at 4:32:37 AM UTC-5, Bjorn Reese wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex">On 11/10/2017 09:16 PM, Brittany Friedman wrote:
<br>
<br>&gt; As I understand, boost tribool uses Kleene algebra. Personally I h=
ave=20
<br>&gt; found Lukazsiewicz easier to understand and more useful.
<br>
<br>I have found that it depends on the use case:
<br>
<br>=C2=A0 =C2=A0<a href=3D"http://breese.github.io/2015/07/05/layers-of-th=
ree-valued-logic.html" rel=3D"nofollow" target=3D"_blank">http://breese.git=
hub.io/2015/<wbr>07/05/layers-of-three-valued-l<wbr>ogic.html</a>
<br>
<br>&gt; The point of this post was to point out that any proposition of cr=
eating=20
<br>&gt; a tribool needs to have a very clear idea of what this third state=
=20
<br>&gt; actually means.
<br>
<br>Absolutely agree.<br></blockquote><div><br></div></div><div>I would go =
even further. No tri-state boolean type should be named anything as simple =
as `tribool`. The name of the type should clearly indicate what the third s=
tate means. Like a `maybe_bool` or an `invalid_bool` or whatever.</div><div=
><br></div><div>Or even better, we could have a `tribool` template that is =
given an enum defining the three states. The 0 value must be false, the 1 v=
alue must be true, and the 2 value must be the third state. And the templat=
e could have extension machinery so that the user can define 3rd state comp=
arisons (true and false comparisons always work as expected).<br></div></di=
v>...</blockquote></div><br></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACCwyzfyH%2Bv6ih1%2Bfx6SpAAngGGVotoT=
skHpQSTxLNkjpx-x1Q%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACCwyzfyH%2B=
v6ih1%2Bfx6SpAAngGGVotoTskHpQSTxLNkjpx-x1Q%40mail.gmail.com</a>.<br />

--001a113bc5b0ce5de3055db72ef1--

.
