Topic: Anybody interested in reviewing


Author: Ivan Matek <libbooze@gmail.com>
Date: Sun, 17 Feb 2019 19:43:18 +0100
Raw View
--00000000000078fb8305821b62a0
Content-Type: text/plain; charset="UTF-8"

On Sun, Feb 17, 2019 at 4:04 AM Nicol Bolas <jmckesson@gmail.com> wrote:

> Your strongest argument was about == and != being potentially faster, and
> that has already been changed (ie: EWG approved. I don't believe CWG has
> approved wording), pursuant to P1190 and P1185.
>
> Not really. The fact that proposal was broken for == and != shows  how
"powerful" and "elegant" it was, but that is not the strongest
argument(IMO, others may disagree).
Strongest argument is not to butcher the core language, for feature that
has no large benefits.

> I find most of the rest of your arguments to be specious and highly
> opinionated with little factual basis behind them.
>
Unlike scientific fact that we need <=>? Funny how during my career I have
never heard anybody in the real world complain(and I like gossiping about
C++ with coworkers) about missing a 3 way comparison(people complain about
verbosity of <, == ... but like I tried to explain that does not mean we
need <=>).

> I was particularly amused by your argument that the "average C++
> developer" cannot be expected to be able to learn about anything within the
> standard library's namespace.
>
 strawman(that is not what I said).


> Also, performance is not really the reason for `<=>`; it's convenience,
> consistency, and ease of use without *sacrificing* performance. So the
> fact that nobody can prove that `<=>` is undeniably faster in some case not
> really relevant. So long as it isn't *slower*, it's a net-gain.
>
I disagree that <=> is convenient or easy to use.
So assuming that for me <=> should prove it's performance is worth the
ugliness it brings to core language.

>
> Oh, and as for real code that is more readable with `<=>` than without it,
> just look at any implementation of `std::optional`.
>
Standardization should not care about optional like library code. C++
should be optimized for millions of regular developers, not 20-100 people
that write boost/std libraries.

Tnx for replying, and informing me about a typo.

--
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/CAB%3D%2B0%2BMgKfFV1wFCrbsDrUjHfVc84nXTuTEuZsRDDU0jZnK6nA%40mail.gmail.com.

--00000000000078fb8305821b62a0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Sun, Feb 17, 2019 at 4:04 AM Nicol Bolas &lt;<a href=3D"mailto:jm=
ckesson@gmail.com">jmckesson@gmail.com</a>&gt; wrote:<br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Your strongest =
argument was about =3D=3D and !=3D being potentially faster, and that has a=
lready been changed (ie: EWG approved. I don&#39;t believe CWG has approved=
 wording), pursuant to P1190 and P1185.</div><div><br></div></div></blockqu=
ote><div>Not really. The fact that proposal was broken for =3D=3D and !=3D =
shows=C2=A0 how &quot;powerful&quot; and &quot;elegant&quot; it was, but th=
at is not the strongest argument(IMO, others may disagree).</div><div> Stro=
ngest argument is not to butcher the core language, for feature that has no=
 large benefits.<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
><div dir=3D"ltr"><div></div><div>I find most of the rest of your arguments=
 to be specious and highly opinionated with little factual basis behind the=
m.</div></div></blockquote><div>Unlike scientific fact that we need &lt;=3D=
&gt;? Funny how during my career I have never heard anybody in the real wor=
ld complain(and I like gossiping about C++ with coworkers) about missing a =
3 way comparison(people complain about verbosity of &lt;, =3D=3D ... but li=
ke I tried to explain that does not mean we need &lt;=3D&gt;). <br></div><b=
lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le=
ft:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div> I wa=
s particularly amused by your argument that the &quot;average C++ developer=
&quot; cannot be expected to be able to learn about anything within the sta=
ndard library&#39;s namespace.</div></div></blockquote><div>=C2=A0strawman(=
that is not what I said).<br></div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,=
204,204);padding-left:1ex"><div dir=3D"ltr"><div></div><div>Also, performan=
ce is not really the reason for `&lt;=3D&gt;`; it&#39;s convenience, consis=
tency, and ease of use without <i>sacrificing</i> performance. So the fact =
that nobody can prove that `&lt;=3D&gt;` is undeniably faster in some case =
not really relevant. So long as it isn&#39;t <i>slower</i>, it&#39;s a net-=
gain.<br></div></div></blockquote><div>I disagree that &lt;=3D&gt; is conve=
nient or easy to use. <br></div><div>So assuming that for me &lt;=3D&gt; sh=
ould prove it&#39;s performance is worth the ugliness it brings to core lan=
guage. <br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=
=3D"ltr"><div></div><div><br></div><div>Oh, and as for real code that is mo=
re readable with `&lt;=3D&gt;` than without it, just look at any implementa=
tion of `std::optional`.</div></div></blockquote><div>Standardization shoul=
d not care about optional like library code. C++ should be optimized for mi=
llions of regular developers, not 20-100 people that write boost/std librar=
ies. <br></div><div><br></div><div>Tnx for replying, and informing me about=
 a typo.<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/CAB%3D%2B0%2BMgKfFV1wFCrbsDrUjHfVc84n=
XTuTEuZsRDDU0jZnK6nA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAB%3D%2B0%=
2BMgKfFV1wFCrbsDrUjHfVc84nXTuTEuZsRDDU0jZnK6nA%40mail.gmail.com</a>.<br />

--00000000000078fb8305821b62a0--

.


Author: =?UTF-8?B?R2HFoXBlciBBxb5tYW4=?= <gasper.azman@gmail.com>
Date: Mon, 18 Feb 2019 23:21:57 +0000
Raw View
--000000000000c28f3305823364c9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

It's on my to-do list - but as a rough tldr: use <=3D> to implement all the
ordering operators, but use < in calling it.

On Mon, Feb 18, 2019, 23:11 Vishal Oza <vickoza@gmail.com wrote:

> I think that the spaceship operator <=3D> feature needs more information =
on
> how it should be used for common programmer. I do not think that the
> spaceship operator <=3D> should be used removed from the standard. I woul=
d
> like some more books and articles on how to use this feature both as a
> run-time feature and a compile-time feature.
>
> On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com
> wrote:
>>
>> Hi everybody,
>>
>> I do not participate in C++ standardization, but I dislike <=3D> so much
>> that I am considering writing an proposal to stop it.
>> I know it is futile to try to revert feature this big this late in C++20
>> cycle, it is mostly about doing the right thing=E2=84=A2 even when you h=
ave zero
>> chance of success. :)
>>
>> Draft  is here
>> <https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUY=
kNWTi9w0/edit?usp=3Dsharing>
>> .
>>
>> Feel free to comment objections, requests for clarification... in the
>> document or reply here.
>> Also since I do not attend C++ standardization meetings if somebody like=
s
>> the draft and is interested in presenting it that would also be great.
>>
>> regards,
>> Ivan
>>
> --
> 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/c4244615-609=
7-4d4c-a87a-4b435911b8a5%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/c4244615-60=
97-4d4c-a87a-4b435911b8a5%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=20
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 e=
mail 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/CAANG%3DkUrw1PT-8is%3Dxze4so%3DpXsjf%2BQ1Je6Be%3=
Du3NonaQi2zQA%40mail.gmail.com.

--000000000000c28f3305823364c9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">It&#39;s on my to-do list - but as a rough tldr: use &lt;=
=3D&gt; to implement all the ordering operators, but use &lt; in calling it=
..</div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, Feb 18, 2019=
, 23:11 Vishal Oza &lt;<a href=3D"mailto:vickoza@gmail.com">vickoza@gmail.c=
om</a> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I th=
ink that the spaceship operator &lt;=3D&gt; feature needs more information =
on how it should be used for common programmer. I do not think that the spa=
ceship operator &lt;=3D&gt; should be used removed from the standard. I wou=
ld like some more books and articles on how to use this feature both as a r=
un-time feature and a compile-time feature.<br><br>On Saturday, February 16=
, 2019 at 3:43:01 PM UTC-6, <a href=3D"mailto:libb...@gmail.com" target=3D"=
_blank" rel=3D"noreferrer">libb...@gmail.com</a> wrote:<blockquote class=3D=
"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div dir=3D"ltr"><div>Hi everybody, <br></div><div><br>=
</div><div>I do not participate in
 C++ standardization, but I dislike &lt;=3D&gt; so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
 mostly about doing the right thing<span>=E2=84=A2</span> even when you hav=
e zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing" rel=3D"nofollow noreferrer" target=3D"_blank">here</a>.</div><=
div><br></div><div>Feel free to comment objections, requests for clarificat=
ion... in the document or reply here.</div><div>Also
 since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<br></div></div></bloc=
kquote></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" target=3D"_=
blank" rel=3D"noreferrer">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank" rel=3D"noreferrer">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/c4244615-6097-4d4c-a87a-4b435911b8a5%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"noreferrer">https://groups.google.com/a/isocpp.org/d/msgid/std-propo=
sals/c4244615-6097-4d4c-a87a-4b435911b8a5%40isocpp.org</a>.<br>
</blockquote></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/CAANG%3DkUrw1PT-8is%3Dxze4so%3DpXsjf%=
2BQ1Je6Be%3Du3NonaQi2zQA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Df=
ooter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAANG%3=
DkUrw1PT-8is%3Dxze4so%3DpXsjf%2BQ1Je6Be%3Du3NonaQi2zQA%40mail.gmail.com</a>=
..<br />

--000000000000c28f3305823364c9--

.


Author: Vishal Oza <vickoza@gmail.com>
Date: Mon, 18 Feb 2019 15:34:50 -0800 (PST)
Raw View
------=_Part_861_978820378.1550532890362
Content-Type: multipart/alternative;
 boundary="----=_Part_862_743777450.1550532890363"

------=_Part_862_743777450.1550532890363
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thank you I have a simple uses case but this is more like a hello world and=
=20
not a production ready example I would like more examples to refine my=20
understanding

#include <iostream>
#include <compare>
int main()
{
    auto a =3D 75;
    auto b =3D 175;
    if (auto comp =3D a <=3D> b; comp > 0)
        std::cout << "greater\n";
    else if (comp =3D=3D 0)
        std::cout << "equal\n";
    else
        std::cout << "lesser\n";
}



On Monday, February 18, 2019 at 5:22:12 PM UTC-6, Ga=C5=A1per A=C5=BEman wr=
ote:
>
> It's on my to-do list - but as a rough tldr: use <=3D> to implement all t=
he=20
> ordering operators, but use < in calling it.
>
> On Mon, Feb 18, 2019, 23:11 Vishal Oza <vic...@gmail.com <javascript:>=20
> wrote:
>
>> I think that the spaceship operator <=3D> feature needs more information=
 on=20
>> how it should be used for common programmer. I do not think that the=20
>> spaceship operator <=3D> should be used removed from the standard. I wou=
ld=20
>> like some more books and articles on how to use this feature both as a=
=20
>> run-time feature and a compile-time feature.
>>
>> On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com=20
>> wrote:
>>>
>>> Hi everybody,=20
>>>
>>> I do not participate in C++ standardization, but I dislike <=3D> so muc=
h=20
>>> that I am considering writing an proposal to stop it.
>>> I know it is futile to try to revert feature this big this late in C++2=
0=20
>>> cycle, it is mostly about doing the right thing=E2=84=A2 even when you =
have=20
>>> zero chance of success. :)
>>>
>>> Draft  is here=20
>>> <https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtU=
YkNWTi9w0/edit?usp=3Dsharing>
>>> .
>>>
>>> Feel free to comment objections, requests for clarification... in the=
=20
>>> document or reply here.
>>> Also since I do not attend C++ standardization meetings if somebody=20
>>> likes the draft and is interested in presenting it that would also be g=
reat.
>>>
>>> regards,=20
>>> Ivan
>>>
>> --=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit=20
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/c4244615-60=
97-4d4c-a87a-4b435911b8a5%40isocpp.org=20
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/c4244615-6=
097-4d4c-a87a-4b435911b8a5%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>

--=20
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 e=
mail 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/f699812c-8fc6-4080-9eaa-0ff339fc2917%40isocpp.or=
g.

------=_Part_862_743777450.1550532890363
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thank you I have a simple uses case but this is more like =
a hello world and not a production ready example I would like more examples=
 to refine my understanding<div><br></div><div><div class=3D"prettyprint" s=
tyle=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 1=
87); border-style: solid; border-width: 1px; overflow-wrap: break-word;"><c=
ode class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"colo=
r: #800;" class=3D"styled-by-prettify">#include</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080;" c=
lass=3D"styled-by-prettify">&lt;iostream&gt;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #800;" c=
lass=3D"styled-by-prettify">#include</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"sty=
led-by-prettify">&lt;compare&gt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">int</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> main</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r></span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0=
 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> a </span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #066;" class=3D"styled-by-prettify">75</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">auto</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> b </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify"=
>175</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=
=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">if</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> comp </span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> a </span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&lt;=3D&gt;</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> b</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> comp </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #066;" class=3D"styled-by-prettify">0</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </=
span><span style=3D"color: #000;" class=3D"styled-by-prettify">std</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify">cout </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">&lt;&lt;</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080=
;" class=3D"styled-by-prettify">&quot;greater\n&quot;</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">else</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">if</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
>comp </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D=
=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #066;" class=3D"styled-by-prettify">0</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 st=
d</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">cout </span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&lt;&lt;</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #080;" class=3D"styled-by-prettify">&quot;equal\n&quot;</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">else</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0=
 std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify">cout </span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">&lt;&lt;</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #080;" class=3D"styled-by-prettify">&quot;lesser\n&quot;</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">}</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br><br></span></div></code></div><br><br>=
On Monday, February 18, 2019 at 5:22:12 PM UTC-6, Ga=C5=A1per A=C5=BEman wr=
ote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex=
;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"auto">It&#39;s=
 on my to-do list - but as a rough tldr: use &lt;=3D&gt; to implement all t=
he ordering operators, but use &lt; in calling it.</div><br><div class=3D"g=
mail_quote"><div dir=3D"ltr">On Mon, Feb 18, 2019, 23:11 Vishal Oza &lt;<a =
href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"E4VOr3xpAAA=
J" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39;;return=
 true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;">vic...@g=
mail.com</a> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr=
">I think that the spaceship operator &lt;=3D&gt; feature needs more inform=
ation on how it should be used for common programmer. I do not think that t=
he spaceship operator &lt;=3D&gt; should be used removed from the standard.=
 I would like some more books and articles on how to use this feature both =
as a run-time feature and a compile-time feature.<br><br>On Saturday, Febru=
ary 16, 2019 at 3:43:01 PM UTC-6, <a rel=3D"noreferrer">libb...@gmail.com</=
a> wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.=
8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Hi e=
verybody, <br></div><div><br></div><div>I do not participate in
 C++ standardization, but I dislike &lt;=3D&gt; so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
 mostly about doing the right thing<span>=E2=84=A2</span> even when you hav=
e zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing" rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=3D=
&#39;https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtU=
YkNWTi9w0/edit?usp\x3dsharing&#39;;return true;" onclick=3D"this.href=3D&#3=
9;https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkN=
WTi9w0/edit?usp\x3dsharing&#39;;return true;">here</a>.</div><div><br></div=
><div>Feel free to comment objections, requests for clarification... in the=
 document or reply here.</div><div>Also
 since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<br></div></div></bloc=
kquote></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"javascript:" rel=3D"nofollow" target=3D"_blank" gdf-obfu=
scated-mailto=3D"E4VOr3xpAAAJ" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" rel=3D"nofollo=
w" target=3D"_blank" gdf-obfuscated-mailto=3D"E4VOr3xpAAAJ" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@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/c4244615-6097-4d4c-a87a-4b435911b8a5%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" rel=3D"nofollow" t=
arget=3D"_blank" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/c4244615-6097-4d4c-a87a-4b435911b8a5%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" on=
click=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/c4244615-6097-4d4c-a87a-4b435911b8a5%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/c4244615-6097-4d4c-<wbr>a87a-=
4b435911b8a5%40isocpp.org</a><wbr>.<br>
</blockquote></div>
</blockquote></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/f699812c-8fc6-4080-9eaa-0ff339fc2917%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/f699812c-8fc6-4080-9eaa-0ff339fc2917=
%40isocpp.org</a>.<br />

------=_Part_862_743777450.1550532890363--

------=_Part_861_978820378.1550532890362--

.


Author: Dejan Milosavljevic <dmilos@gmail.com>
Date: Mon, 25 Feb 2019 12:18:10 +0100
Raw View
--000000000000316c0b0582b61906
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Agree to have three-way operator.
Disagree that this operator should be consisted of <=3D>.
Tilde might good candidate or double tilde. Hmm scratch that heavy collide
with bit not.

Probably I miss something.
What is literal name of this operator?

From my experience  'hello world' should be

switch( a spaceship b)
{
   case(1): std::cout << "greater\n"; break;
   case(0): std::cout << "equal\n"; break;
   case(-1): std::cout << "lesser\n"; break;
}


On Tue, Feb 19, 2019 at 12:34 AM Vishal Oza <vickoza@gmail.com> wrote:

> Thank you I have a simple uses case but this is more like a hello world
> and not a production ready example I would like more examples to refine m=
y
> understanding
>
> #include <iostream>
> #include <compare>
> int main()
> {
>     auto a =3D 75;
>     auto b =3D 175;
>     if (auto comp =3D a <=3D> b; comp > 0)
>         std::cout << "greater\n";
>     else if (comp =3D=3D 0)
>         std::cout << "equal\n";
>     else
>         std::cout << "lesser\n";
> }
>
>
>
> On Monday, February 18, 2019 at 5:22:12 PM UTC-6, Ga=C5=A1per A=C5=BEman =
wrote:
>>
>> It's on my to-do list - but as a rough tldr: use <=3D> to implement all =
the
>> ordering operators, but use < in calling it.
>>
>> On Mon, Feb 18, 2019, 23:11 Vishal Oza <vic...@gmail.com wrote:
>>
>>> I think that the spaceship operator <=3D> feature needs more informatio=
n
>>> on how it should be used for common programmer. I do not think that the
>>> spaceship operator <=3D> should be used removed from the standard. I wo=
uld
>>> like some more books and articles on how to use this feature both as a
>>> run-time feature and a compile-time feature.
>>>
>>> On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com
>>> wrote:
>>>>
>>>> Hi everybody,
>>>>
>>>> I do not participate in C++ standardization, but I dislike <=3D> so mu=
ch
>>>> that I am considering writing an proposal to stop it.
>>>> I know it is futile to try to revert feature this big this late in
>>>> C++20 cycle, it is mostly about doing the right thing=E2=84=A2 even wh=
en you
>>>> have zero chance of success. :)
>>>>
>>>> Draft  is here
>>>> <https://docs.google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwt=
UYkNWTi9w0/edit?usp=3Dsharing>
>>>> .
>>>>
>>>> Feel free to comment objections, requests for clarification... in the
>>>> document or reply here.
>>>> Also since I do not attend C++ standardization meetings if somebody
>>>> likes the draft and is interested in presenting it that would also be =
great.
>>>>
>>>> regards,
>>>> Ivan
>>>>
>>> --
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit
>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/c4244615-6=
097-4d4c-a87a-4b435911b8a5%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/c4244615-=
6097-4d4c-a87a-4b435911b8a5%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>
>>> .
>>>
>> --
> 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/f699812c-8fc=
6-4080-9eaa-0ff339fc2917%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f699812c-8f=
c6-4080-9eaa-0ff339fc2917%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=20
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 e=
mail 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/CAEfefmyLGpro2-yAcrdUZjeO4PmtQUAwrHSp1dHSrcWewmi=
%3DJg%40mail.gmail.com.

--000000000000316c0b0582b61906
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div di=
r=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div>Agree to =
have three-way=C2=A0operator.</div><div>Disagree that this operator should =
be consisted of &lt;=3D&gt;.</div><div>Tilde might=C2=A0good candidate or d=
ouble tilde. Hmm scratch that heavy collide with bit not.</div><div><br></d=
iv><div>Probably I miss something. </div><div>What is literal name of this =
operator?</div><div><br></div><div>From my experience=C2=A0 &#39;hello worl=
d&#39; should be=C2=A0</div><div><br></div><div><font color=3D"#000000">swi=
tch</font><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" st=
yle=3D"color:rgb(102,102,0)">(</span><span class=3D"gmail-m_-85254930981354=
18246styled-by-prettify" style=3D"color:rgb(0,0,0)"> a=C2=A0</span><span cl=
ass=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(1=
02,102,0)">spaceship</span><span class=3D"gmail-m_-8525493098135418246style=
d-by-prettify" style=3D"color:rgb(0,0,0)"> b</span><span class=3D"gmail-m_-=
8525493098135418246styled-by-prettify" style=3D"color:rgb(102,102,0)">)</sp=
an></div><div><span class=3D"gmail-m_-8525493098135418246styled-by-prettify=
" style=3D"color:rgb(102,102,0)">{</span><span class=3D"gmail-m_-8525493098=
135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"><br>=C2=A0=C2=A0 ca=
se(1): </span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify=
" style=3D"color:rgb(0,0,0)">std</span><span class=3D"gmail-m_-852549309813=
5418246styled-by-prettify" style=3D"color:rgb(102,102,0)">::</span><span cl=
ass=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0=
,0,0)">cout </span><span class=3D"gmail-m_-8525493098135418246styled-by-pre=
ttify" style=3D"color:rgb(102,102,0)">&lt;&lt;</span><span class=3D"gmail-m=
_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"> </span=
><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"co=
lor:rgb(0,136,0)">&quot;greater\n&quot;</span><span class=3D"gmail-m_-85254=
93098135418246styled-by-prettify" style=3D"color:rgb(102,102,0)">; break;</=
span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=
=3D"color:rgb(0,0,0)"><br>=C2=A0=C2=A0=C2=A0case(0): <span class=3D"gmail-m=
_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)">std</sp=
an><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"=
color:rgb(102,102,0)">::</span><span class=3D"gmail-m_-8525493098135418246s=
tyled-by-prettify" style=3D"color:rgb(0,0,0)">cout </span><span class=3D"gm=
ail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(102,102,0)=
">&lt;&lt;</span><span class=3D"gmail-m_-8525493098135418246styled-by-prett=
ify" style=3D"color:rgb(0,0,0)"> </span><span class=3D"gmail-m_-85254930981=
35418246styled-by-prettify" style=3D"color:rgb(0,136,0)">&quot;equal\n&quot=
;</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" styl=
e=3D"color:rgb(102,102,0)">; break;</span></span></div><div><span class=3D"=
gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)">=
<span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"col=
or:rgb(102,102,0)"><font color=3D"#000000">=C2=A0=C2=A0=C2=A0case(-1): </fo=
nt><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"=
color:rgb(0,0,0)">std</span><span class=3D"gmail-m_-8525493098135418246styl=
ed-by-prettify" style=3D"color:rgb(102,102,0)">::</span><span class=3D"gmai=
l-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)">cout=
 </span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" styl=
e=3D"color:rgb(102,102,0)">&lt;&lt;</span><span class=3D"gmail-m_-852549309=
8135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"> </span><span clas=
s=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,1=
36,0)">&quot;lesser\n&quot;</span><span class=3D"gmail-m_-85254930981354182=
46styled-by-prettify" style=3D"color:rgb(102,102,0)">; break;</span></span>=
</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=
=3D"color:rgb(0,0,0)"><span class=3D"gmail-m_-8525493098135418246styled-by-=
prettify" style=3D"color:rgb(102,102,0)"><br></span></span></div><div><span=
 class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rg=
b(102,102,0)"></span><span class=3D"gmail-m_-8525493098135418246styled-by-p=
rettify" style=3D"color:rgb(0,0,0)">}</span></div><div><br></div></div></di=
v></div></div></div></div></div></div><br><div class=3D"gmail_quote"><div c=
lass=3D"gmail_attr" dir=3D"ltr">On Tue, Feb 19, 2019 at 12:34 AM Vishal Oza=
 &lt;<a href=3D"mailto:vickoza@gmail.com">vickoza@gmail.com</a>&gt; wrote:<=
br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e=
x;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px=
;border-left-style:solid"><div dir=3D"ltr">Thank you I have a simple uses c=
ase but this is more like a hello world and not a production ready example =
I would like more examples to refine my understanding<div><br></div><div><d=
iv class=3D"gmail-m_-8525493098135418246prettyprint" style=3D"border:1px so=
lid rgb(187,187,187);background-color:rgb(250,250,250)"><code class=3D"gmai=
l-m_-8525493098135418246prettyprint"><div class=3D"gmail-m_-852549309813541=
8246subprettyprint"><span class=3D"gmail-m_-8525493098135418246styled-by-pr=
ettify" style=3D"color:rgb(136,0,0)">#include</span><span class=3D"gmail-m_=
-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"> </span>=
<span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"col=
or:rgb(0,136,0)">&lt;iostream&gt;</span><span class=3D"gmail-m_-85254930981=
35418246styled-by-prettify" style=3D"color:rgb(0,0,0)"><br></span><span cla=
ss=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(13=
6,0,0)">#include</span><span class=3D"gmail-m_-8525493098135418246styled-by=
-prettify" style=3D"color:rgb(0,0,0)"> </span><span class=3D"gmail-m_-85254=
93098135418246styled-by-prettify" style=3D"color:rgb(0,136,0)">&lt;compare&=
gt;</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" st=
yle=3D"color:rgb(0,0,0)"><br></span><span class=3D"gmail-m_-852549309813541=
8246styled-by-prettify" style=3D"color:rgb(0,0,136)">int</span><span class=
=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,=
0)"> main</span><span class=3D"gmail-m_-8525493098135418246styled-by-pretti=
fy" style=3D"color:rgb(102,102,0)">()</span><span class=3D"gmail-m_-8525493=
098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"><br></span><span=
 class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rg=
b(102,102,0)">{</span><span class=3D"gmail-m_-8525493098135418246styled-by-=
prettify" style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span class=
=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,=
136)">auto</span><span class=3D"gmail-m_-8525493098135418246styled-by-prett=
ify" style=3D"color:rgb(0,0,0)"> a </span><span class=3D"gmail-m_-852549309=
8135418246styled-by-prettify" style=3D"color:rgb(102,102,0)">=3D</span><spa=
n class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:r=
gb(0,0,0)"> </span><span class=3D"gmail-m_-8525493098135418246styled-by-pre=
ttify" style=3D"color:rgb(0,102,102)">75</span><span class=3D"gmail-m_-8525=
493098135418246styled-by-prettify" style=3D"color:rgb(102,102,0)">;</span><=
span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"colo=
r:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span class=3D"gmail-m_-852549309813=
5418246styled-by-prettify" style=3D"color:rgb(0,0,136)">auto</span><span cl=
ass=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0=
,0,0)"> b </span><span class=3D"gmail-m_-8525493098135418246styled-by-prett=
ify" style=3D"color:rgb(102,102,0)">=3D</span><span class=3D"gmail-m_-85254=
93098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"> </span><span =
class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb=
(0,102,102)">175</span><span class=3D"gmail-m_-8525493098135418246styled-by=
-prettify" style=3D"color:rgb(102,102,0)">;</span><span class=3D"gmail-m_-8=
525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"><br>=C2=A0=
 =C2=A0 </span><span class=3D"gmail-m_-8525493098135418246styled-by-prettif=
y" style=3D"color:rgb(0,0,136)">if</span><span class=3D"gmail-m_-8525493098=
135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"> </span><span class=
=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(102,=
102,0)">(</span><span class=3D"gmail-m_-8525493098135418246styled-by-pretti=
fy" style=3D"color:rgb(0,0,136)">auto</span><span class=3D"gmail-m_-8525493=
098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"> comp </span><sp=
an class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:=
rgb(102,102,0)">=3D</span><span class=3D"gmail-m_-8525493098135418246styled=
-by-prettify" style=3D"color:rgb(0,0,0)"> a </span><span class=3D"gmail-m_-=
8525493098135418246styled-by-prettify" style=3D"color:rgb(102,102,0)">&lt;=
=3D&gt;</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify=
" style=3D"color:rgb(0,0,0)"> b</span><span class=3D"gmail-m_-8525493098135=
418246styled-by-prettify" style=3D"color:rgb(102,102,0)">;</span><span clas=
s=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0=
,0)"> comp </span><span class=3D"gmail-m_-8525493098135418246styled-by-pret=
tify" style=3D"color:rgb(102,102,0)">&gt;</span><span class=3D"gmail-m_-852=
5493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"> </span><spa=
n class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:r=
gb(0,102,102)">0</span><span class=3D"gmail-m_-8525493098135418246styled-by=
-prettify" style=3D"color:rgb(102,102,0)">)</span><span class=3D"gmail-m_-8=
525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"><br>=C2=A0=
 =C2=A0 =C2=A0 =C2=A0 </span><span class=3D"gmail-m_-8525493098135418246sty=
led-by-prettify" style=3D"color:rgb(0,0,0)">std</span><span class=3D"gmail-=
m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(102,102,0)">::=
</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=
=3D"color:rgb(0,0,0)">cout </span><span class=3D"gmail-m_-85254930981354182=
46styled-by-prettify" style=3D"color:rgb(102,102,0)">&lt;&lt;</span><span c=
lass=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(=
0,0,0)"> </span><span class=3D"gmail-m_-8525493098135418246styled-by-pretti=
fy" style=3D"color:rgb(0,136,0)">&quot;greater\n&quot;</span><span class=3D=
"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(102,102=
,0)">;</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify"=
 style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><span class=3D"gmail-m=
_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,136)">else<=
/span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=
=3D"color:rgb(0,0,0)"> </span><span class=3D"gmail-m_-8525493098135418246st=
yled-by-prettify" style=3D"color:rgb(0,0,136)">if</span><span class=3D"gmai=
l-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"> </s=
pan><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D=
"color:rgb(102,102,0)">(</span><span class=3D"gmail-m_-8525493098135418246s=
tyled-by-prettify" style=3D"color:rgb(0,0,0)">comp </span><span class=3D"gm=
ail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(102,102,0)=
">=3D=3D</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettif=
y" style=3D"color:rgb(0,0,0)"> </span><span class=3D"gmail-m_-8525493098135=
418246styled-by-prettify" style=3D"color:rgb(0,102,102)">0</span><span clas=
s=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(102=
,102,0)">)</span><span class=3D"gmail-m_-8525493098135418246styled-by-prett=
ify" style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 std</span><=
span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"colo=
r:rgb(102,102,0)">::</span><span class=3D"gmail-m_-8525493098135418246style=
d-by-prettify" style=3D"color:rgb(0,0,0)">cout </span><span class=3D"gmail-=
m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(102,102,0)">&l=
t;&lt;</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify"=
 style=3D"color:rgb(0,0,0)"> </span><span class=3D"gmail-m_-852549309813541=
8246styled-by-prettify" style=3D"color:rgb(0,136,0)">&quot;equal\n&quot;</s=
pan><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D=
"color:rgb(102,102,0)">;</span><span class=3D"gmail-m_-8525493098135418246s=
tyled-by-prettify" style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 </span><spa=
n class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:r=
gb(0,0,136)">else</span><span class=3D"gmail-m_-8525493098135418246styled-b=
y-prettify" style=3D"color:rgb(0,0,0)"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 std<=
/span><span class=3D"gmail-m_-8525493098135418246styled-by-prettify" style=
=3D"color:rgb(102,102,0)">::</span><span class=3D"gmail-m_-8525493098135418=
246styled-by-prettify" style=3D"color:rgb(0,0,0)">cout </span><span class=
=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(102,=
102,0)">&lt;&lt;</span><span class=3D"gmail-m_-8525493098135418246styled-by=
-prettify" style=3D"color:rgb(0,0,0)"> </span><span class=3D"gmail-m_-85254=
93098135418246styled-by-prettify" style=3D"color:rgb(0,136,0)">&quot;lesser=
\n&quot;</span><span class=3D"gmail-m_-8525493098135418246styled-by-prettif=
y" style=3D"color:rgb(102,102,0)">;</span><span class=3D"gmail-m_-852549309=
8135418246styled-by-prettify" style=3D"color:rgb(0,0,0)"><br></span><span c=
lass=3D"gmail-m_-8525493098135418246styled-by-prettify" style=3D"color:rgb(=
102,102,0)">}</span><span class=3D"gmail-m_-8525493098135418246styled-by-pr=
ettify" style=3D"color:rgb(0,0,0)"><br><br></span></div></code></div><br><b=
r>On Monday, February 18, 2019 at 5:22:12 PM UTC-6, Ga=C5=A1per A=C5=BEman =
wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;p=
adding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;bo=
rder-left-style:solid"><div dir=3D"auto">It&#39;s on my to-do list - but as=
 a rough tldr: use &lt;=3D&gt; to implement all the ordering operators, but=
 use &lt; in calling it.</div><br><div class=3D"gmail_quote"><div dir=3D"lt=
r">On Mon, Feb 18, 2019, 23:11 Vishal Oza &lt;<a rel=3D"nofollow">vic...@gm=
ail.com</a> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);bo=
rder-left-width:1px;border-left-style:solid"><div dir=3D"ltr">I think that =
the spaceship operator &lt;=3D&gt; feature needs more information on how it=
 should be used for common programmer. I do not think that the spaceship op=
erator &lt;=3D&gt; should be used removed from the standard. I would like s=
ome more books and articles on how to use this feature both as a run-time f=
eature and a compile-time feature.<br><br>On Saturday, February 16, 2019 at=
 3:43:01 PM UTC-6, <a rel=3D"noreferrer">libb...@gmail.com</a> wrote:<block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-left:=
1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-st=
yle:solid"><div dir=3D"ltr"><div>Hi everybody, <br></div><div><br></div><di=
v>I do not participate in
 C++ standardization, but I dislike &lt;=3D&gt; so much that I am=20
considering writing an proposal to stop it.<br></div><div>I know it is=20
futile to try to revert feature this big this late in C++20 cycle, it is
 mostly about doing the right thing<span>=E2=84=A2</span> even when you hav=
e zero chance of=20
success. :)</div><div><br></div><div>Draft=C2=A0 is <a href=3D"https://docs=
..google.com/document/d/1VMp3_Dn-bY0ic2tTYjzL26QaTX16s2kwtUYkNWTi9w0/edit?us=
p=3Dsharing" target=3D"_blank" rel=3D"nofollow">here</a>.</div><div><br></d=
iv><div>Feel free to comment objections, requests for clarification... in t=
he document or reply here.</div><div>Also
 since I do not attend C++ standardization meetings if somebody likes=20
the draft and is interested in presenting it that would also be great.<br><=
/div><div><br></div><div>regards, <br></div><div>Ivan<br></div></div></bloc=
kquote></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 rel=3D"nofollow">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow">std-pr...@isocpp.o=
rg</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/c4244615-6097-4d4c-a87a-4b435911b8a5%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow">https://groups.google.com/a/isocpp.org/d/msgid/std-proposa=
ls/c4244615-6097-4d4c-a87a-4b435911b8a5%40isocpp.org</a>.<br>
</blockquote></div>
</blockquote></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/f699812c-8fc6-4080-9eaa-0ff339fc2917%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f699812c-8fc6-=
4080-9eaa-0ff339fc2917%40isocpp.org</a>.<br>
</blockquote></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/CAEfefmyLGpro2-yAcrdUZjeO4PmtQUAwrHSp=
1dHSrcWewmi%3DJg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAEfefmyLGpro2-=
yAcrdUZjeO4PmtQUAwrHSp1dHSrcWewmi%3DJg%40mail.gmail.com</a>.<br />

--000000000000316c0b0582b61906--

.


Author: Ivan Matek <libbooze@gmail.com>
Date: Fri, 1 Mar 2019 17:47:26 +0100
Raw View
--0000000000002fea5205830b2abd
Content-Type: text/plain; charset="UTF-8"

On Mon, Feb 25, 2019 at 2:40 PM Barry Revzin <barry.revzin@gmail.com> wrote:

> On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com
> wrote:
> <=> will be in C++20
>
Disappointed, not surprised. :)


>
> But what does <= do? You have two choices:
> Which do you pick?
>
Why do you not just use member's <=?

If you do not want to bother answering since this is futile discussion that
is also fine. :)

Also one more thing I realized rather recently(it is not in the document)
but may be relevant for C++26 so I wonder if you could give opinion.
When Herb does his thing with reflection (C++26?) spaceship will be kind of
suboptimal because people will want to reflect on members and
be able to specify that first you compared cheap members(this can be
guessed by type) or based on some knowledge of usage, for example int
room_number_ has high entropy in use so use that member first.

So in C++26 we may get this:

bla operator<=>(const C& other) = cmp_cheap_first;

where cmp_cheap_first is some heuristic reflection that knows that
comparing built in types is cheap, then it assumes that sizeof POD is
proportional to their cost, and then it goes over rest of members.


Another thing we may want is enable users to specify good or  bad
comparisons while compiler does the rest.
So consider the
bla operator<=>(const Guest& other) = memberwise(room_number_,...); // room
number unlikely to be same compare that first
or
bla operator<=>(const Guest& other) = memberwise(..., title_); // most
titles are "Mr" or "Mrs", do whatever you want but compare title_ last

regards,
Ivan

--
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/CAB%3D%2B0%2BOtfXGd_QdpHihhYHOz5%3DJ4EB2NZOJH8UD9txjz_H%2BO%2BQ%40mail.gmail.com.

--0000000000002fea5205830b2abd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Mon, Feb 25, 2019 at 2:40 PM Barry=
 Revzin &lt;<a href=3D"mailto:barry.revzin@gmail.com">barry.revzin@gmail.co=
m</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
><div dir=3D"ltr">On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, <a hr=
ef=3D"mailto:libb...@gmail.com" target=3D"_blank">libb...@gmail.com</a> wro=
te:<div>&lt;=3D&gt; will be in C++20</div></div></blockquote><div>Disappoin=
ted, not surprised. :) <br></div><div>=C2=A0</div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20=
4,204);padding-left:1ex"><div dir=3D"ltr"><div><span id=3D"gmail-m_12922616=
09811401172docs-internal-guid-03635d25-7fff-d743-536e-a8bfa8597894"><br><di=
v>But what does &lt;=3D do? You have two choices:<br></div></span><span id=
=3D"gmail-m_1292261609811401172docs-internal-guid-03635d25-7fff-d743-536e-a=
8bfa8597894"><div>Which do you pick? <br></div></span></div></div></blockqu=
ote>Why do you not just use member&#39;s &lt;=3D? <br></div><div class=3D"g=
mail_quote"><br></div><div class=3D"gmail_quote">If you do not want to both=
er answering since this is futile discussion that is also fine. :)</div><di=
v class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">Also one more =
thing I realized rather recently(it is not in the document) but may be rele=
vant for C++26 so I wonder if you could give opinion.</div><div class=3D"gm=
ail_quote">When Herb does his thing with reflection (C++26?) spaceship will=
 be kind of suboptimal because people will want to reflect on members and <=
br></div><div class=3D"gmail_quote">be able to specify that first you compa=
red cheap members(this can be guessed by type) or based on some knowledge o=
f usage, for example int room_number_ has high entropy in use so use that m=
ember first.</div><div class=3D"gmail_quote"><br></div><div class=3D"gmail_=
quote">So in C++26 we may get this:</div><div class=3D"gmail_quote"><br></d=
iv><div class=3D"gmail_quote"><span style=3D"font-family:monospace,monospac=
e">bla operator&lt;=3D&gt;(const C&amp; other) =3D cmp_cheap_first; <br></s=
pan></div><div class=3D"gmail_quote"><span style=3D"font-family:monospace,m=
onospace"><br></span></div><div class=3D"gmail_quote"><span style=3D"font-f=
amily:monospace,monospace"><font face=3D"arial,helvetica,sans-serif">where =
cmp_cheap_first is some heuristic reflection that knows that comparing buil=
t in types is cheap, then it assumes that sizeof POD is proportional to the=
ir cost, and then it goes over rest of members.</font></span></div><div cla=
ss=3D"gmail_quote"><span style=3D"font-family:monospace,monospace"><font fa=
ce=3D"arial,helvetica,sans-serif"><br></font></span></div><div class=3D"gma=
il_quote"><span style=3D"font-family:monospace,monospace"><font face=3D"ari=
al,helvetica,sans-serif"><br></font></span></div><div class=3D"gmail_quote"=
><span style=3D"font-family:monospace,monospace"><font face=3D"arial,helvet=
ica,sans-serif">Another thing we may want is enable users to specify good o=
r=C2=A0 bad comparisons while compiler does the rest.</font></span></div><d=
iv class=3D"gmail_quote"><span style=3D"font-family:monospace,monospace"><f=
ont face=3D"arial,helvetica,sans-serif">So consider the <br></font></span><=
/div><div class=3D"gmail_quote"><span style=3D"font-family:monospace,monosp=
ace">bla operator&lt;=3D&gt;(const Guest&amp; other) =3D memberwise(room_nu=
mber_,...); // room number unlikely to be same compare that first<br></span=
></div><div class=3D"gmail_quote">or<span style=3D"font-family:monospace,mo=
nospace"><br></span></div><div class=3D"gmail_quote"><span style=3D"font-fa=
mily:monospace,monospace">
</span><div class=3D"gmail_quote"><span style=3D"font-family:monospace,mono=
space">bla operator&lt;=3D&gt;(const Guest&amp; other) =3D memberwise(..., =
title_); // most titles are &quot;Mr&quot; or &quot;Mrs&quot;, do whatever =
you want but compare title_ last<br></span></div>

</div><div class=3D"gmail_quote"><span style=3D"font-family:monospace,monos=
pace"><font face=3D"arial,helvetica,sans-serif"></font></span><br></div><di=
v class=3D"gmail_quote">regards,</div><div class=3D"gmail_quote">Ivan<br></=
div><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote"><br></d=
iv><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote"><br></di=
v><div class=3D"gmail_quote"><br></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/CAB%3D%2B0%2BOtfXGd_QdpHihhYHOz5%3DJ4=
EB2NZOJH8UD9txjz_H%2BO%2BQ%40mail.gmail.com?utm_medium=3Demail&utm_source=
=3Dfooter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAB=
%3D%2B0%2BOtfXGd_QdpHihhYHOz5%3DJ4EB2NZOJH8UD9txjz_H%2BO%2BQ%40mail.gmail.c=
om</a>.<br />

--0000000000002fea5205830b2abd--

.


Author: Barry Revzin <barry.revzin@gmail.com>
Date: Fri, 1 Mar 2019 11:31:10 -0800 (PST)
Raw View
------=_Part_488_1119127211.1551468670656
Content-Type: multipart/alternative;
 boundary="----=_Part_489_36572101.1551468670657"

------=_Part_489_36572101.1551468670657
Content-Type: text/plain; charset="UTF-8"

On Friday, March 1, 2019 at 10:47:41 AM UTC-6, Ivan Matek wrote:
>
>
>
> On Mon, Feb 25, 2019 at 2:40 PM Barry Revzin <barry....@gmail.com
> <javascript:>> wrote:
>
>> On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com
>> wrote:
>> <=> will be in C++20
>>
> Disappointed, not surprised. :)
>
>
>>
>> But what does <= do? You have two choices:
>> Which do you pick?
>>
> Why do you not just use member's <=?
>

You can do. It just means that if you're a type that provides something
other than lexicographic, member-wise comparison, you have to write *both* <
and <= (in addition to ==). Whichever way you go about doing (which
typically will just be <= just invoking <), that still seems worse than
just being able to write one <=>.

The only real benefit of this approach vs the <=> we have in C++20 is
slightly shorter defaulting of comparisons? That doesn't seem like a good
tradeoff when comparing the two options.


> If you do not want to bother answering since this is futile discussion
> that is also fine. :)
>
> Also one more thing I realized rather recently(it is not in the document)
> but may be relevant for C++26 so I wonder if you could give opinion.
> When Herb does his thing with reflection (C++26?) spaceship will be kind
> of suboptimal because people will want to reflect on members and
> be able to specify that first you compared cheap members(this can be
> guessed by type) or based on some knowledge of usage, for example int
> room_number_ has high entropy in use so use that member first.
>


I don't see at all how this makes spaceship "suboptimal". The defaulted <=>
won't do what you want, but that doesn't prevent you from writing a
non-defaulted <=>. But writing these kinds of comparisons using <=> is
still much easier than without <=>:

auto operator<=>(Type const& rhs) const {
    constexpr vector<meta::info> members = get_sorted_members_for_comparison
();
    for ... (constexpr meta::info member : members) {
        auto cmp = this->idexpr(member) <=> rhs.idexpr(member);
        if (cmp != 0) {
            return cmp;
        }
    }
    return strong_ordering::equal;
}

This needs some slight massaging to get the return type right, but
otherwise it's quite nice.

--
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/82f8dd84-6321-437d-9a40-ff6ee6e014fb%40isocpp.org.

------=_Part_489_36572101.1551468670657
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, March 1, 2019 at 10:47:41 AM UTC-6, Ivan Matek =
wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8=
ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div di=
r=3D"ltr"><br></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon,=
 Feb 25, 2019 at 2:40 PM Barry Revzin &lt;<a href=3D"javascript:" target=3D=
"_blank" gdf-obfuscated-mailto=3D"sHa5H1jUAgAJ" rel=3D"nofollow" onmousedow=
n=3D"this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=
=3D&#39;javascript:&#39;;return true;">barry....@gmail.com</a>&gt; wrote:<b=
r></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">=
On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, <a>libb...@gmail.com</a=
> wrote:<div>&lt;=3D&gt; will be in C++20</div></div></blockquote><div>Disa=
ppointed, not surprised. :) <br></div><div>=C2=A0</div><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex"><div dir=3D"ltr"><div><span><br><div>But what=
 does &lt;=3D do? You have two choices:<br></div></span><span><div>Which do=
 you pick? <br></div></span></div></div></blockquote>Why do you not just us=
e member&#39;s &lt;=3D? <br></div></div></blockquote><div><br></div><div>Yo=
u can do. It just means that if you&#39;re a type that provides something o=
ther than lexicographic, member-wise comparison, you have to write <i>both<=
/i>=C2=A0&lt; and &lt;=3D (in addition to =3D=3D). Whichever way you go abo=
ut doing (which typically will just be &lt;=3D just invoking &lt;), that st=
ill seems worse than just being able to write one &lt;=3D&gt;.=C2=A0</div><=
div><br></div><div>The only real benefit of this approach vs the &lt;=3D&gt=
; we have in C++20 is slightly shorter defaulting of comparisons? That does=
n&#39;t seem like a good tradeoff when comparing the two options.</div><div=
><br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><d=
iv class=3D"gmail_quote"></div><div class=3D"gmail_quote"><br></div><div cl=
ass=3D"gmail_quote">If you do not want to bother answering since this is fu=
tile discussion that is also fine. :)</div><div class=3D"gmail_quote"><br><=
/div><div class=3D"gmail_quote">Also one more thing I realized rather recen=
tly(it is not in the document) but may be relevant for C++26 so I wonder if=
 you could give opinion.</div><div class=3D"gmail_quote">When Herb does his=
 thing with reflection (C++26?) spaceship will be kind of suboptimal becaus=
e people will want to reflect on members and <br></div><div class=3D"gmail_=
quote">be able to specify that first you compared cheap members(this can be=
 guessed by type) or based on some knowledge of usage, for example int room=
_number_ has high entropy in use so use that member first.</div></div></blo=
ckquote><div><br></div><div><br></div><div>I don&#39;t see at all how this =
makes spaceship &quot;suboptimal&quot;. The defaulted &lt;=3D&gt; won&#39;t=
 do what you want, but that doesn&#39;t prevent you from writing a non-defa=
ulted &lt;=3D&gt;. But writing these kinds of comparisons using &lt;=3D&gt;=
 is still much easier than without &lt;=3D&gt;:</div><div><br></div><div><d=
iv class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); bor=
der-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; over=
flow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpretty=
print"><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">operator</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&lt;=3D&gt;(</span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">Type</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #=
008;" class=3D"styled-by-prettify">const</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> rhs</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>const</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </sp=
an><span style=3D"color: #008;" class=3D"styled-by-prettify">constexpr</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> vector</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">meta</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">info</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> members </span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> get_sorted_members_for_comparison</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">();</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">for</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">...</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">constexpr</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> meta</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify">info member=
 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> members</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> cmp </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">this</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">-&gt;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify">idexpr</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
">member</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">&lt;=3D&gt;</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> rhs</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">idexpr</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">member</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">if</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify">cmp</span><font color=3D"#666600"><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">!=3D</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-prett=
ify">0</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"><br></span></font><span style=
=3D"color: #000;" class=3D"styled-by-prettify">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">return</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 cmp</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">}</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">}</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">return</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> strong_ordering</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">::</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
equal</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">}</span></div></code=
></div><br>This needs some slight massaging to get the return type right, b=
ut otherwise it&#39;s quite nice.</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/82f8dd84-6321-437d-9a40-ff6ee6e014fb%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/82f8dd84-6321-437d-9a40-ff6ee6e014fb=
%40isocpp.org</a>.<br />

------=_Part_489_36572101.1551468670657--

------=_Part_488_1119127211.1551468670656--

.


Author: Barry Revzin <barry.revzin@gmail.com>
Date: Fri, 1 Mar 2019 11:49:21 -0800 (PST)
Raw View
------=_Part_290_729406082.1551469761176
Content-Type: multipart/alternative;
 boundary="----=_Part_291_159041587.1551469761176"

------=_Part_291_159041587.1551469761176
Content-Type: text/plain; charset="UTF-8"



On Friday, March 1, 2019 at 1:31:10 PM UTC-6, Barry Revzin wrote:
>
> On Friday, March 1, 2019 at 10:47:41 AM UTC-6, Ivan Matek wrote:
>>
>>
>>
>> On Mon, Feb 25, 2019 at 2:40 PM Barry Revzin <barry....@gmail.com> wrote:
>>
>>> On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, libb...@gmail.com
>>> wrote:
>>> <=> will be in C++20
>>>
>> Disappointed, not surprised. :)
>>
>>
>>>
>>> But what does <= do? You have two choices:
>>> Which do you pick?
>>>
>> Why do you not just use member's <=?
>>
>
> You can do. It just means that if you're a type that provides something
> other than lexicographic, member-wise comparison, you have to write *both* <
> and <= (in addition to ==). Whichever way you go about doing (which
> typically will just be <= just invoking <), that still seems worse than
> just being able to write one <=>.
>
> The only real benefit of this approach vs the <=> we have in C++20 is
> slightly shorter defaulting of comparisons? That doesn't seem like a good
> tradeoff when comparing the two options.
>

And to elaborate, it really is only slightly shorter:

default operator: <, <=, ==, !=, >=, >;      // proposed here
auto operator<=>(C const&) const = default;  // C++20


--
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/fafecf1b-2bb2-4803-8745-797bd8cbb4ac%40isocpp.org.

------=_Part_291_159041587.1551469761176
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Friday, March 1, 2019 at 1:31:10 PM UTC-6, Barr=
y Revzin wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-=
left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr=
">On Friday, March 1, 2019 at 10:47:41 AM UTC-6, Ivan Matek wrote:<blockquo=
te class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><br></div>=
<br><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, Feb 25, 2019 at 2:4=
0 PM Barry Revzin &lt;<a rel=3D"nofollow">barry....@gmail.com</a>&gt; wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"lt=
r">On Saturday, February 16, 2019 at 3:43:01 PM UTC-6, <a>libb...@gmail.com=
</a> wrote:<div>&lt;=3D&gt; will be in C++20</div></div></blockquote><div>D=
isappointed, not surprised. :) <br></div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div><span><br><div>But w=
hat does &lt;=3D do? You have two choices:<br></div></span><span><div>Which=
 do you pick? <br></div></span></div></div></blockquote>Why do you not just=
 use member&#39;s &lt;=3D? <br></div></div></blockquote><div><br></div><div=
>You can do. It just means that if you&#39;re a type that provides somethin=
g other than lexicographic, member-wise comparison, you have to write <i>bo=
th</i>=C2=A0&lt; and &lt;=3D (in addition to =3D=3D). Whichever way you go =
about doing (which typically will just be &lt;=3D just invoking &lt;), that=
 still seems worse than just being able to write one &lt;=3D&gt;.=C2=A0</di=
v><div><br></div><div>The only real benefit of this approach vs the &lt;=3D=
&gt; we have in C++20 is slightly shorter defaulting of comparisons? That d=
oesn&#39;t seem like a good tradeoff when comparing the two options.</div><=
/div></blockquote><div><br></div><div>And to elaborate, it really is only s=
lightly shorter:</div><div><br></div><div><div class=3D"prettyprint" style=
=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187);=
 border-style: solid; border-width: 1px; overflow-wrap: break-word;"><code =
class=3D"prettyprint"><div class=3D"subprettyprint"><div class=3D"subpretty=
print">default operator: &lt;, &lt;=3D, =3D=3D, !=3D, &gt;=3D, &gt;;=C2=A0 =
=C2=A0 =C2=A0 // proposed here</div><div class=3D"subprettyprint">auto oper=
ator&lt;=3D&gt;(C const&amp;) const =3D default;=C2=A0 // C++20</div></div>=
</code></div><br><br></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/fafecf1b-2bb2-4803-8745-797bd8cbb4ac%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/fafecf1b-2bb2-4803-8745-797bd8cbb4ac=
%40isocpp.org</a>.<br />

------=_Part_291_159041587.1551469761176--

------=_Part_290_729406082.1551469761176--

.


Author: Ivan Matek <libbooze@gmail.com>
Date: Fri, 1 Mar 2019 21:12:44 +0100
Raw View
--0000000000005eeeda05830e084e
Content-Type: text/plain; charset="UTF-8"

On Fri, Mar 1, 2019 at 8:31 PM Barry Revzin <barry.revzin@gmail.com> wrote:

> The only real benefit of this approach vs the <=> we have in C++20 is
> slightly shorter defaulting of comparisons? That doesn't seem like a good
> tradeoff when comparing the two options.
>
> Also return types differ. And people make fun of me for this, but I really
do feel this is confusing to average C++ developer, and that confusion is
not worth the benefits.


> I don't see at all how this makes spaceship "suboptimal". The defaulted
> <=> won't do what you want, but that doesn't prevent you from writing a
> non-defaulted <=>. But writing these kinds of comparisons using <=> is
> still much easier than without <=>:
>
It is suboptimal because you are writing logic instead of doing something
in a declarative way.
I mean your code is nice because you have for each member so code is less
fragile than if it was listing every member by name, but for something so
common I would hope for language support for declarative way of doing that.
Or at least a way to write something declarative using reflection.
In other words I would like to have a way to write a metafunction(or how do
you want to call it) that I can use like this
auto operator<=>(Type const& rhs) const = my_meta_fn(room_number_, ...);
In other words my_meta_fn creates the function based on
arguments(room_number_,....) (and implicit T argument) and then that
function is assigned to the operator <=>.
I know people can use CRTP and other wizardry for this, but this is what I
would like to see since it is "locally readable"(like lambdas are more
easier to read than some struct 50 lines above the usage).

--
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/CAB%3D%2B0%2BOUJ2Cm9wVWHOyU-f4kJzp58W9XV81nCAXN2OASM4pNBQ%40mail.gmail.com.

--0000000000005eeeda05830e084e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Fri, Mar 1, 2019 at 8:31 PM Barry =
Revzin &lt;<a href=3D"mailto:barry.revzin@gmail.com">barry.revzin@gmail.com=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
<div dir=3D"ltr"><div></div><div>The only real benefit of this approach vs =
the &lt;=3D&gt; we have in C++20 is slightly shorter defaulting of comparis=
ons? That doesn&#39;t seem like a good tradeoff when comparing the two opti=
ons.</div><div><br></div></div></blockquote><div>Also return types differ. =
And people make fun of me for this, but I really do feel this is confusing =
to average C++ developer, and that confusion is not worth the benefits. <br=
></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0=
px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><=
div dir=3D"ltr"><div></div><div>I don&#39;t see at all how this makes space=
ship &quot;suboptimal&quot;. The defaulted &lt;=3D&gt; won&#39;t do what yo=
u want, but that doesn&#39;t prevent you from writing a non-defaulted &lt;=
=3D&gt;. But writing these kinds of comparisons using &lt;=3D&gt; is still =
much easier than without &lt;=3D&gt;:</div></div></blockquote><div>It is su=
boptimal because you are writing logic instead of doing something in a decl=
arative way. <br></div><div>I mean your code is nice because you have for e=
ach member so code is less fragile than if it was listing every member by n=
ame, but for something so common I would hope for language support for decl=
arative way of doing that. <br></div><div>Or at least a way to write someth=
ing declarative using reflection.<br></div><div>In other words I would like=
 to have a way to write a metafunction(or how do you want to call it) that =
I can use like this</div><div><span style=3D"font-family:monospace,monospac=
e">
<code class=3D"gmail-m_-6023866205691834532prettyprint"><span style=3D"colo=
r:rgb(0,0,136)" class=3D"gmail-m_-6023866205691834532styled-by-prettify">au=
to</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_-602386620569183=
4532styled-by-prettify"> </span><span style=3D"color:rgb(0,0,136)" class=3D=
"gmail-m_-6023866205691834532styled-by-prettify">operator</span><span style=
=3D"color:rgb(102,102,0)" class=3D"gmail-m_-6023866205691834532styled-by-pr=
ettify">&lt;=3D&gt;(</span><span style=3D"color:rgb(102,0,102)" class=3D"gm=
ail-m_-6023866205691834532styled-by-prettify">Type</span><span style=3D"col=
or:rgb(0,0,0)" class=3D"gmail-m_-6023866205691834532styled-by-prettify"> </=
span><span style=3D"color:rgb(0,0,136)" class=3D"gmail-m_-60238662056918345=
32styled-by-prettify">const</span><span style=3D"color:rgb(102,102,0)" clas=
s=3D"gmail-m_-6023866205691834532styled-by-prettify">&amp;</span><span styl=
e=3D"color:rgb(0,0,0)" class=3D"gmail-m_-6023866205691834532styled-by-prett=
ify"> rhs</span><span style=3D"color:rgb(102,102,0)" class=3D"gmail-m_-6023=
866205691834532styled-by-prettify">)</span><span style=3D"color:rgb(0,0,0)"=
 class=3D"gmail-m_-6023866205691834532styled-by-prettify"> </span><span sty=
le=3D"color:rgb(0,0,136)" class=3D"gmail-m_-6023866205691834532styled-by-pr=
ettify">const</span></code> =3D my_meta_fn(room_number_, ...);</span></div>=
<div><span style=3D"font-family:monospace,monospace"><font face=3D"arial,he=
lvetica,sans-serif">In other words</font> my_meta_fn <font face=3D"arial,he=
lvetica,sans-serif">creates the function based on arguments(room_number_,..=
...) (and implicit T argument) and then that function is assigned to the ope=
rator &lt;=3D&gt;. <br></font></span></div><div><span style=3D"font-family:=
monospace,monospace"><font face=3D"arial,helvetica,sans-serif">I know peopl=
e can use CRTP and other wizardry for this, but this is what I would like t=
o see since it is &quot;locally readable&quot;(like lambdas are more easier=
 to read than some struct 50 lines above the usage).</font><br></span></div=
><div><br></div><div> <br></div><br></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/CAB%3D%2B0%2BOUJ2Cm9wVWHOyU-f4kJzp58W=
9XV81nCAXN2OASM4pNBQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAB%3D%2B0%=
2BOUJ2Cm9wVWHOyU-f4kJzp58W9XV81nCAXN2OASM4pNBQ%40mail.gmail.com</a>.<br />

--0000000000005eeeda05830e084e--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Fri, 1 Mar 2019 14:19:50 -0800 (PST)
Raw View
------=_Part_613_1433032849.1551478790379
Content-Type: multipart/alternative;
 boundary="----=_Part_614_347354828.1551478790379"

------=_Part_614_347354828.1551478790379
Content-Type: text/plain; charset="UTF-8"

On Friday, March 1, 2019 at 3:12:58 PM UTC-5, Ivan Matek wrote:
>
> On Fri, Mar 1, 2019 at 8:31 PM Barry Revzin <barry....@gmail.com
> <javascript:>> wrote:
>
>> The only real benefit of this approach vs the <=> we have in C++20 is
>> slightly shorter defaulting of comparisons? That doesn't seem like a good
>> tradeoff when comparing the two options.
>>
>> Also return types differ.
>

Differ from what?


> And people make fun of me for this, but I really do feel this is confusing
> to average C++ developer, and that confusion is not worth the benefits.
>

But you haven't really explained *why* it is confusing. Or at least, the
reasons you have given are unconvincing. Statements like "core language
feature that will be often used and returns one of magic types that lives
in std:: (and none of their names mean anything to average C++ developer)
is not teachable." are just not really going to convince anyone that
`std::strong_order operator<=>(const my_type&) = default;` is unteachable.

It literally says what it does:  "strongly-ordered comparison with my_type,
generated by default"; you can read the code left-to-right, doing some
basic substitutions, and you get conventional English. If someone can't
teach that, then that's not a problem with the feature; it's either with
the students or the teacher.

I don't see at all how this makes spaceship "suboptimal". The defaulted <=>
>> won't do what you want, but that doesn't prevent you from writing a
>> non-defaulted <=>. But writing these kinds of comparisons using <=> is
>> still much easier than without <=>:
>>
> It is suboptimal because you are writing logic instead of doing something
> in a declarative way.
>
I mean your code is nice because you have for each member so code is less
> fragile than if it was listing every member by name, but for something so
> common I would hope for language support for declarative way of doing that.
>

The "common" thing is to do member-wise comparison. If you need a less
common thing, then you have to spell it out explicitly. I fail to see what
is "suboptimal" about this.

Or at least a way to write something declarative using reflection.
> In other words I would like to have a way to write a metafunction(or how
> do you want to call it) that I can use like this
> auto operator<=>(Type const& rhs) const = my_meta_fn(room_number_, ...);
> In other words my_meta_fn creates the function based on
> arguments(room_number_,....) (and implicit T argument) and then that
> function is assigned to the operator <=>.
>

But you cannot have that without `operator<=>` being a real construct. Why
should we wait for generative reflection when we can get something useful
now? It's not like the current syntax makes generative reflection-based
implementations impossible or something.

Plus, a defaulted `<=>` operator gives the compiler more opportunities to
optimize things. Being explicit and direct about what you want (in order,
member-wise comparison) allows the compiler to play games that requiring
the user to always spell everything out in some metafunction wouldn't allow.

--
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/26d3c3bc-0cd1-40ab-b947-31467eb14e2c%40isocpp.org.

------=_Part_614_347354828.1551478790379
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, March 1, 2019 at 3:12:58 PM UTC-5, Ivan Matek w=
rote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8e=
x;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div cla=
ss=3D"gmail_quote"><div dir=3D"ltr">On Fri, Mar 1, 2019 at 8:31 PM Barry Re=
vzin &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D=
"1fB78YvfAgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:=
&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return tru=
e;">barry....@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,=
204);padding-left:1ex"><div dir=3D"ltr"><div></div><div>The only real benef=
it of this approach vs the &lt;=3D&gt; we have in C++20 is slightly shorter=
 defaulting of comparisons? That doesn&#39;t seem like a good tradeoff when=
 comparing the two options.</div><div><br></div></div></blockquote><div>Als=
o return types differ.</div></div></div></blockquote><div><br></div><div>Di=
ffer from what?<br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote"=
 style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-=
left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><div>And people mak=
e fun of me for this, but I really do feel this is confusing to average C++=
 developer, and that confusion is not worth the benefits.<br></div></div></=
div></blockquote><div><br></div><div>But you haven&#39;t really explained <=
i>why</i> it is confusing. Or at least, the reasons you have given are unco=
nvincing. Statements like &quot;core language feature that will be often us=
ed and returns one of magic types that lives in std:: (and none of their na=
mes mean anything to average C++ developer) is not teachable.&quot; are jus=
t not really going to convince anyone that `std::strong_order operator&lt;=
=3D&gt;(const my_type&amp;) =3D default;` is unteachable.</div><div><br></d=
iv><div>It literally says what it does:=C2=A0 &quot;strongly-ordered compar=
ison with my_type, generated by default&quot;; you can read the code left-t=
o-right, doing some basic substitutions, and you get conventional English. =
If someone can&#39;t teach that, then that&#39;s not a problem with the fea=
ture; it&#39;s either with the students or the teacher.<br></div><div><br><=
/div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8e=
x;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div cla=
ss=3D"gmail_quote"><div></div><div></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
dding-left:1ex"><div dir=3D"ltr"><div></div><div>I don&#39;t see at all how=
 this makes spaceship &quot;suboptimal&quot;. The defaulted &lt;=3D&gt; won=
&#39;t do what you want, but that doesn&#39;t prevent you from writing a no=
n-defaulted &lt;=3D&gt;. But writing these kinds of comparisons using &lt;=
=3D&gt; is still much easier than without &lt;=3D&gt;:</div></div></blockqu=
ote><div>It is suboptimal because you are writing logic instead of doing so=
mething in a declarative way.</div></div></div></blockquote><blockquote cla=
ss=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #=
ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><=
div></div><div>I mean your code is nice because you have for each member so=
 code is less fragile than if it was listing every member by name, but for =
something so common I would hope for language support for declarative way o=
f doing that.<br></div></div></div></blockquote><div><br></div>The &quot;co=
mmon&quot; thing is to do member-wise comparison. If you need a less common=
 thing, then you have to spell it out explicitly. I fail to see what is &qu=
ot;suboptimal&quot; about this.<br><div><br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;=
padding-left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><div></div>=
<div>Or at least a way to write something declarative using reflection.<br>=
</div><div>In other words I would like to have a way to write a metafunctio=
n(or how do you want to call it) that I can use like this</div><div><span s=
tyle=3D"font-family:monospace,monospace">
<code><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rg=
b(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">operator</span><span s=
tyle=3D"color:rgb(102,102,0)">&lt;=3D&gt;(</span><span style=3D"color:rgb(1=
02,0,102)">Type</span><span style=3D"color:rgb(0,0,0)"> </span><span style=
=3D"color:rgb(0,0,136)">const</span><span style=3D"color:rgb(102,102,0)">&a=
mp;</span><span style=3D"color:rgb(0,0,0)"> rhs</span><span style=3D"color:=
rgb(102,102,0)">)</span><span style=3D"color:rgb(0,0,0)"> </span><span styl=
e=3D"color:rgb(0,0,136)">const</span></code> =3D my_meta_fn(room_number_, .=
...);</span></div><div><span style=3D"font-family:monospace,monospace"><font=
 face=3D"arial,helvetica,sans-serif">In other words</font> my_meta_fn <font=
 face=3D"arial,helvetica,sans-serif">creates the function based on argument=
s(room_number_,....) (and implicit T argument) and then that function is as=
signed to the operator &lt;=3D&gt;. <br></font></span></div></div></div></b=
lockquote><div><br></div><div>But you cannot have that without `operator&lt=
;=3D&gt;` being a real construct. Why should we wait for generative reflect=
ion when we can get something useful now? It&#39;s not like the current syn=
tax makes generative reflection-based implementations impossible or somethi=
ng.</div><div><br></div><div>Plus, a defaulted `&lt;=3D&gt;` operator gives=
 the compiler more opportunities to optimize things. Being explicit and dir=
ect about what you want (in order, member-wise comparison) allows the compi=
ler to play games that requiring the user to always spell everything out in=
 some metafunction wouldn&#39;t allow.<br></div><br></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/26d3c3bc-0cd1-40ab-b947-31467eb14e2c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/26d3c3bc-0cd1-40ab-b947-31467eb14e2c=
%40isocpp.org</a>.<br />

------=_Part_614_347354828.1551478790379--

------=_Part_613_1433032849.1551478790379--

.