220 4429 <CAPXezF-5gA57z8ZHriHJai9+d5-MDH19HGzDK3O4YO4waf=VnQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Fernando Cacciola <fernando.cacciola@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Fixing Standard Library relational operators (was:
 Re: optional Rev.4 (N3672): What was the rationale to remove
 !=, >=, ...)
Date: Wed, 15 May 2013 11:04:36 -0300
Lines: 271
Approved: news@gmane.org
Message-ID: <CAPXezF-5gA57z8ZHriHJai9+d5-MDH19HGzDK3O4YO4waf=VnQ@mail.gmail.com>
References: <CAGg_6+NTws7QyEAsEUd308yx4LncpD_r6x4yJEJy5RN2w6v2Hw@mail.gmail.com>
 <CAGg_6+PTyNK6rTAdC3NKLOnLR3g0WfyqgNKmHz-9edMOdjnVNA@mail.gmail.com>
 <CAFk2RUZw2wyMrbaRpYzWApeRNp2kx0MK7wurbD09P+D5r_As9w@mail.gmail.com>
 <CAFk2RUbdNQi+qBL2H55nZcZT++t26jREW_2r24yHQq2LcdrQnQ@mail.gmail.com>
 <CAGqM8fY=iZmwKBjLvqimn5d3pAtvLQgKbknPkG6WSYFZ2_OfZw@mail.gmail.com>
 <CAPXezF-kXv6M62uuYBYspcRYg1JwUiSOx04ooeGH-z55APHbGA@mail.gmail.com>
 <CAFk2RUbbkVg5+r47UfkyD0-WTGm9=oi4OKNrX+V8--wN+74J+A@mail.gmail.com>
 <CAPXezF9fYSRtR2pExe=25JpUGvsG_UK9bZFMHcm_HGfCj-hr_w@mail.gmail.com>
 <CAFk2RUZ3iqP-Hrjkf9q_Jy1wd0ZEjyU1D6U4504EOS1C=6+i7A@mail.gmail.com>
 <CAPXezF89r7S7=-wKyet=uy+Y_aeykCgf-WeB_QY3ndVo=VPpwg@mail.gmail.com> <CAOHCbitjW4UTDb3Q=dDc4yZ2qVS6XfvZRKRvjWF8ePYEgiNwog@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7b343baa44fbdb04dcc23d5f
X-Trace: ger.gmane.org 1368626719 5621 80.91.229.3 (15 May 2013 14:05:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 15 May 2013 14:05:19 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCOPV7FAXQPRBHFMZ2GAKGQEK2ATBZY@isocpp.org Wed May 15 16:05:20 2013
Return-path: <std-proposals+bncBCOPV7FAXQPRBHFMZ2GAKGQEK2ATBZY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-fa0-f69.google.com ([209.85.161.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCOPV7FAXQPRBHFMZ2GAKGQEK2ATBZY@isocpp.org>)
	id 1UccKW-0006gA-0e
	for gclcip-std-proposals@m.gmane.org; Wed, 15 May 2013 16:05:20 +0200
Original-Received: by mail-fa0-f69.google.com with SMTP id a11sf1427347fad.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 May 2013 07:05:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:received-spf:x-received
         :mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=26+cxnbfNG4sDE9vuPuh0tE66HwZhmwGWYqfIbsNcJE=;
        b=r5TN/xSp1le6y74roCWbDDkBs9KzyOSUq+64MuFLoOBP6cUqKQOBC/mQ23o1S2VBnq
         S8ZBvAE3tZDR4Gvzbot+/q/yRSJJ7uFfpIratL9crOdYXPI1V9eir2FcaEuexaxkYe3E
         BOPpCCx0eyl2EPNlia4TkfwIAHWeYvG80uMbf7ix35Rw8F27L0fz4mroJOEkwpWbUVqb
         cxsW+Sxp8y6s5OKIDx8FDieTTm2bzk4hvF6dz9tv0U3/qTeSxq41FR/etCECQ0WShH6L
         lK4Jyyzs5bv1fgglmwoGBNU7fykUpOgrTpiUCJ4AGdzHIDnWb29iRKs64FPfXdjOM6qO
  
X-Received: by 10.112.140.105 with SMTP id rf9mr11346873lbb.21.1368626717240;
        Wed, 15 May 2013 07:05:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.27.230 with SMTP id w6ls52408lag.68.gmail; Wed, 15 May
 2013 07:05:16 -0700 (PDT)
X-Received: by 10.112.156.133 with SMTP id we5mr17820052lbb.22.1368626716714;
        Wed, 15 May 2013 07:05:16 -0700 (PDT)
Original-Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [2a00:1450:4010:c03::22a])
        by mx.google.com with ESMTPS id pc8si1106781lbc.188.2013.05.15.07.05.16
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 15 May 2013 07:05:16 -0700 (PDT)
Received-SPF: pass (google.com: domain of fernando.cacciola@gmail.com designates 2a00:1450:4010:c03::22a as permitted sender) client-ip=2a00:1450:4010:c03::22a;
Original-Received: by mail-la0-f42.google.com with SMTP id er20so1807236lab.15
        for <std-proposals@isocpp.org>; Wed, 15 May 2013 07:05:16 -0700 (PDT)
X-Received: by 10.112.149.8 with SMTP id tw8mr17450925lbb.117.1368626716538;
 Wed, 15 May 2013 07:05:16 -0700 (PDT)
Original-Received: by 10.114.80.164 with HTTP; Wed, 15 May 2013 07:04:36 -0700 (PDT)
In-Reply-To: <CAOHCbitjW4UTDb3Q=dDc4yZ2qVS6XfvZRKRvjWF8ePYEgiNwog@mail.gmail.com>
X-Original-Sender: fernando.cacciola@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of fernando.cacciola@gmail.com designates 2a00:1450:4010:c03::22a as
 permitted sender) smtp.mail=fernando.cacciola@gmail.com;       dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4429
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4429>

--047d7b343baa44fbdb04dcc23d5f
Content-Type: text/plain; charset=ISO-8859-1

On Wed, May 15, 2013 at 10:58 AM, Tony V E <tvaneerd@gmail.com> wrote:

>
>
>
> On Wed, May 15, 2013 at 8:30 AM, Fernando Cacciola <
> fernando.cacciola@gmail.com> wrote:
>
>> On Wed, May 15, 2013 at 9:25 AM, Ville Voutilainen <
>> ville.voutilainen@gmail.com> wrote:
>>
>>>
>>>
>>>
>>> On 15 May 2013 15:20, Fernando Cacciola <fernando.cacciola@gmail.com>wrote:
>>>
>>>> I did a little bit of further homework on the matter. boost::tuple does
>>>> NOT synthesize the comparison operators,
>>>>
>>>>> but rather calls the operator of the underlying type. The existing
>>>>> practice isn't consistent. ;)
>>>>>
>>>>> This needs at least an overview paper. I'd be willing to entertain the
>>>>> idea to propose making all relational
>>>>> operators, including tuple and containers, to not synthesize. I
>>>>> suppose the fallback plans are synthesize-for-all
>>>>> and deliberately-inconsistent, not necessarily in any preference order.
>>>>>
>>>>> In addition to that, tuples and containers would seemingly need
>>>>> std::less specializations. That's actually somewhat separate.
>>>>>
>>>>> Fernando, Tony, would you be interested in coauthoring?
>>>>>
>>>>
>>>> Now that I am much more convinced that the right approach is to not
>>>> synthesize (consistently across the whole library), I would definitely like
>>>> to coauthor such a paper!
>>>>
>>>>
>>>>
>>> For you, and Tony too, I want to include the "fallback" options in the
>>> paper. According to what Nevin said,
>>> people may already rely on the existing synthesizing, so the outcome is
>>> not easy to predict. At a minimum,
>>> I'll live with whatever the decision will be, at least we have voiced
>>> the concerns with the paper.
>>>
>>> Agreed.
>>
>>>
>
> Since I was planning on writing a paper or two about this anyhow, I will
> definitely help.
>
> I think the best fallback plan is that in the case where T *does not have*
> an operator>, the tuple will still generate one, (if T *does* have > that
> it is used). So any existing code that wouldn't compile without
> synthesizing will still work. (If T had inconsistent operators, they get a
> behaviour change due to no longer synthesizing.)
>
> Makes sense.


> But I'd like to consider that a (partial) backwards compatibility hack,
> and not have optional support that behaviour. ie I'd rather have optional >
> fail to compile if you don't have the underlying operator.
>

OK. I think this is a good idea in the specific case of optional. I do
share the view of others that optional is something of a T more than the
other wrappers and containers.

>
> I'd prefer if as much as possible each issue was a separate paper.
>  Optional operator> separate from optional std::less.  tuple/pair separate
> from optional.
>

Agreed.


-- 
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



--047d7b343baa44fbdb04dcc23d5f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On W=
ed, May 15, 2013 at 10:58 AM, Tony V E <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:tvaneerd@gmail.com" target=3D"_blank">tvaneerd@gmail.com</a>&gt;</span>=
 wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div class=3D"h5"><br>=
<div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Wed, May 1=
5, 2013 at 8:30 AM, Fernando Cacciola <span dir=3D"ltr">&lt;<a href=3D"mail=
to:fernando.cacciola@gmail.com" target=3D"_blank">fernando.cacciola@gmail.c=
om</a>&gt;</span> wrote:<br>


<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_extra">=
<div class=3D"gmail_quote"><div>On Wed, May 15, 2013 at 9:25 AM, Ville Vout=
ilainen <span dir=3D"ltr">&lt;<a href=3D"mailto:ville.voutilainen@gmail.com=
" target=3D"_blank">ville.voutilainen@gmail.com</a>&gt;</span> wrote:<br>




<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><div class=3D"gmail_ext=
ra"><br><br><div class=3D"gmail_quote"><div>On 15 May 2013 15:20, Fernando =
Cacciola <span dir=3D"ltr">&lt;<a href=3D"mailto:fernando.cacciola@gmail.co=
m" target=3D"_blank">fernando.cacciola@gmail.com</a>&gt;</span> wrote:<br>





<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_extra">=
<div class=3D"gmail_quote"><div><div>I did a little bit of further homework=
 on the matter. boost::tuple does NOT synthesize the comparison operators,<=
br>





<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_extra">=
<div class=3D"gmail_quote"><div>but rather calls the operator of the underl=
ying type. The existing practice isn&#39;t consistent. ;)<br>








<br></div><div>This needs at least an overview paper. I&#39;d be willing to=
 entertain the idea to propose making all relational<br>operators, includin=
g tuple and containers, to not synthesize. I suppose the fallback plans are=
 synthesize-for-all<br>








and deliberately-inconsistent, not necessarily in any preference order.<br>=
<br></div></div>In addition to that, tuples and containers would seemingly =
need std::less specializations. That&#39;s actually somewhat separate.<br>








<br></div><div class=3D"gmail_extra">Fernando, Tony, would you be intereste=
d in coauthoring?<br></div></div></blockquote><div><br></div></div></div><d=
iv>Now that I am much more convinced that the right approach is to not synt=
hesize (consistently across the whole library), I would definitely like to =
coauthor such a paper!<br>







<br><br></div></div></div></div></blockquote><div><br></div></div><div>For =
you, and Tony too, I want to include the &quot;fallback&quot; options in th=
e paper. According to what Nevin said,<br></div><div>people may already rel=
y on the existing synthesizing, so the outcome is not easy to predict. At a=
 minimum,<br>





</div><div>I&#39;ll live with whatever the decision will be, at least we ha=
ve voiced the concerns with the paper.<br></div></div><br></div></div></blo=
ckquote></div><div>Agreed. <br></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div><div>

</div></div></blockquote></div></div></div></blockquote></div><br></div><di=
v class=3D"gmail_extra"><br></div></div></div><div class=3D"gmail_extra">Si=
nce I was planning on writing a paper or two about this anyhow, I will defi=
nitely help.</div>


<div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">I think the=
 best fallback plan is that in the case where T *does not have* an operator=
&gt;, the tuple will still generate one, (if T *does* have &gt; that it is =
used). So any existing code that wouldn&#39;t compile without synthesizing =
will still work. (If T had inconsistent operators, they get a behaviour cha=
nge due to no longer synthesizing.)</div>


<div class=3D"gmail_extra"><br></div></div></blockquote><div>Makes sense.<b=
r>=A0<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"><div class=
=3D"gmail_extra">

</div><div class=3D"gmail_extra">But I&#39;d like to consider that a (parti=
al) backwards compatibility hack, and not have optional support that behavi=
our. ie I&#39;d rather have optional &gt; fail to compile if you don&#39;t =
have the underlying operator.</div>

</div></blockquote><div><br></div><div>OK. I think this is a good idea in t=
he specific case of optional. I do share the view of others that optional i=
s something of a T more than the other wrappers and containers. <br></div>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr">
<div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">I&#39;d pre=
fer if as much as possible each issue was a separate paper. =A0Optional ope=
rator&gt; separate from optional std::less. =A0tuple/pair separate from opt=
ional.<span class=3D"HOEnZb"><font color=3D"#888888"><br>

</font></span></div></div></blockquote><div><br></div><div>Agreed. <br><br>=
</div></div><br>-- <br>Fernando Cacciola<br>SciSoft Consulting, Founder<br>=
<a href=3D"http://www.scisoft-consulting.com">http://www.scisoft-consulting=
..com</a>
</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

--047d7b343baa44fbdb04dcc23d5f--

.
