220 4249 <CAOHCbiunfVdO7woaYpZC7uaYbgMznqfjiS9qjMaHrSnWxxZXqw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Tony V E <tvaneerd@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: Fri, 3 May 2013 15:45:38 -0400
Lines: 156
Approved: news@gmane.org
Message-ID: <CAOHCbiunfVdO7woaYpZC7uaYbgMznqfjiS9qjMaHrSnWxxZXqw@mail.gmail.com>
References: <CAGg_6+NTws7QyEAsEUd308yx4LncpD_r6x4yJEJy5RN2w6v2Hw@mail.gmail.com>
	<CAPXezF9duRWCYnWr2DqfFjim6w2MPc3TMQOR+pJ4tryUnAeOtQ@mail.gmail.com>
	<CAPXezF8G-553darW6YfNKCnWQH0+TNeMAep-X3ozTY1=PXqsag@mail.gmail.com>
	<5f236e41-0f5f-4288-a80f-9eadb5168c38@isocpp.org>
	<CAFk2RUZT93__SiUdvD+=x+Z5MiCWGFUaiinsMHE+z515YndmEA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c34a3a79194504dbd59811
X-Trace: ger.gmane.org 1367610344 2855 80.91.229.3 (3 May 2013 19:45:44 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 3 May 2013 19:45:44 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUZ5QWKNQIOLJ4QRQCRUBEHQRXDO@isocpp.org Fri May 03 21:45:43 2013
Return-path: <std-proposals+bncBCUZ5QWKNQIOLJ4QRQCRUBEHQRXDO@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-fa0-f70.google.com ([209.85.161.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIOLJ4QRQCRUBEHQRXDO@isocpp.org>)
	id 1UYLvK-0000nN-Ie
	for gclcip-std-proposals@m.gmane.org; Fri, 03 May 2013 21:45:42 +0200
Original-Received: by mail-fa0-f70.google.com with SMTP id a11sf3134537fad.1
        for <gclcip-std-proposals@m.gmane.org>; Fri, 03 May 2013 12:45:42 -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:mime-version
         :x-received:in-reply-to:references:date:message-id:subject:from: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=w+o9XBn6EReqPHY0ILH+5g1aWNBB0TWO0aoUk3pG1j0=;
        b=PkOBC0oadZzWG5rjhSXsFgP/ucGt33Uehcd5cyys0o4snEjlC/lo/ZB7xBEY7dqp1D
         GDxUv60kSkXQmKF76Jb+F+Nkc5LTFZ4YGsESW093Sna/mh/7m559BrYnBUuNvq4yVpTy
         Wp6AV1uBPNdLyV5nT37ZgtN2otkSkRihDSq/0bRccdtG2g9u7rjDYDDy4c9SwdZCXcU5
         KF788WQuN6oii+5XYFrc16E4BPw38eTbBo5dxBhHLBygZD/OwftRyn7Sm0vpyWoL1ebT
         zkY/pbDzy3fAM6T3k56NYJbFrMW30aBE/CF9vZo9b3AtMczwkUgp0lKM2BV39JkbJoGh
  
X-Received: by 10.112.145.196 with SMTP id sw4mr13332396lbb.5.1367610341775;
        Fri, 03 May 2013 12:45:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.129.197 with SMTP id ny5ls166910lab.26.gmail; Fri, 03 May
 2013 12:45:39 -0700 (PDT)
X-Received: by 10.112.130.40 with SMTP id ob8mr4773407lbb.55.1367610339595;
        Fri, 03 May 2013 12:45:39 -0700 (PDT)
Original-Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172])
        by mx.google.com with ESMTPS id s5si2457192las.239.2013.05.03.12.45.39
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Fri, 03 May 2013 12:45:39 -0700 (PDT)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172;
Original-Received: by mail-lb0-f172.google.com with SMTP id y6so1880900lbh.31
        for <std-proposals@isocpp.org>; Fri, 03 May 2013 12:45:39 -0700 (PDT)
X-Received: by 10.112.72.163 with SMTP id e3mr796415lbv.28.1367610339430; Fri,
 03 May 2013 12:45:39 -0700 (PDT)
Original-Received: by 10.112.2.167 with HTTP; Fri, 3 May 2013 12:45:38 -0700 (PDT)
In-Reply-To: <CAFk2RUZT93__SiUdvD+=x+Z5MiCWGFUaiinsMHE+z515YndmEA@mail.gmail.com>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of tvaneerd@gmail.com designates 209.85.217.172 as permitted sender)
 smtp.mail=tvaneerd@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:4249
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4249>

--001a11c34a3a79194504dbd59811
Content-Type: text/plain; charset=ISO-8859-1

On Fri, May 3, 2013 at 2:12 PM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

>
>
>
> On 3 May 2013 20:55, Marc <marc.glisse@gmail.com> wrote:
>
>>
>> But why should I, as someone using a non total order, have to specialize
>> anything? If the underlying type has operator>, then optional should use it
>> for >. If it doesn't, then optional shouldn't either. If  you are using
>> rel_ops with T, you can just as well use rel_ops with optional<T>.
>>
>>
>>
> Currently tuple, pair and containers don't do that. It would be reasonable
> to be consistent in that regard
> with optional, and consider further changes separately afterwards.
>
>
>
>
You know that we will never change tuple, unless we can somehow come up
with a backwards compatible change (ie generate > only if not defined by
underlying type - that would at least break *less* people).


I don't understand the importance of consistency with tuple.

You currently cannot do

tuple<int>()  <  int()


You *can* do

optional<int>()   <  int()


Mixed relops are part of "optional acts like T with one more value".

If you must pick "consistency" then consistency with T is more important
than consistency with tuple.  There really isn't much analogy between tuple
and optional.  Yes they are both templated structs.  The End.

I find tuple<> more like a cheap struct, like the classic EmployeeRecord
struct.  And it doesn't bother me that EmployeeRecord isn't sorted exactly
like its members, so I can live with tuple<> not sorting like its members.
(still bothers me, but I can live with it)


When will *any* code get a surprising result because optional works
differently than tuple?
There *will* be code that is surprised that optional ordered T differently
than T did.  Not much code, but some.


The opening paragraphs of the optional proposal described a number of
mental models for optinoal<> and chose "T with one more value".  If that is
the model, then acting like T is more important than acting like tuple.

Tony

-- 

--- 
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.



--001a11c34a3a79194504dbd59811
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On Fri, May 3, 2013 at 2:12 PM, Ville Voutilainen <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:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><br><div=
 class=3D"h5"><br><br><div class=3D"gmail_quote"><div class=3D"im">On 3 May=
 2013 20:55, Marc <span dir=3D"ltr">&lt;<a href=3D"mailto:marc.glisse@gmail=
..com" target=3D"_blank">marc.glisse@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex"><br><div>But why should I=
, as someone using a non total order, have to specialize anything? If the u=
nderlying type has operator&gt;, then optional should use it for &gt;. If i=
t doesn&#39;t, then optional shouldn&#39;t either. If=A0 you are using rel_=
ops with T, you can just as well use rel_ops with optional&lt;T&gt;.<br>

</div><div><div>



<br><br></div></div></blockquote><div><br></div></div><div>Currently tuple,=
 pair and containers don&#39;t do that. It would be reasonable to be consis=
tent in that regard<br>with optional, and consider further changes separate=
ly afterwards.<br>

</div></div><br>
<br><br></div></div></blockquote><div><br></div><div>You know that we will =
never change tuple, unless we can somehow come up with a backwards compatib=
le change (ie generate &gt; only if not defined by underlying type - that w=
ould at least break *less* people).<br>
<br><br></div><div>I don&#39;t understand the importance of consistency wit=
h tuple.<br><br>You currently cannot do<br><br></div><div>tuple&lt;int&gt;(=
)=A0 &lt;=A0 int()<br><br><br></div><div>You *can* do<br><br></div><div>opt=
ional&lt;int&gt;()=A0=A0 &lt;=A0 int()<br>
<br><br></div><div>Mixed relops are part of &quot;optional acts like T with=
 one more value&quot;.<br><br></div><div>If you must pick &quot;consistency=
&quot; then consistency with T is more important than consistency with tupl=
e.=A0 There really isn&#39;t much analogy between tuple and optional.=A0 Ye=
s they are both templated structs.=A0 The End.<br>
<br>I=20
find tuple&lt;&gt; more like a cheap struct, like the classic=20
EmployeeRecord struct.=A0 And it doesn&#39;t bother me that EmployeeRecord=
=20
isn&#39;t sorted exactly like its members, so I can live with tuple&lt;&gt;=
=20
not sorting like its members.=A0 (still bothers me, but I can live with=20
it)<br><br><br>When will *any* code get a surprising result because optiona=
l works differently than tuple?<br></div><div>There *will* be code that is =
surprised that optional ordered T differently than T did.=A0 Not much code,=
 but some.<br>
<br><br></div><div>The opening paragraphs of the optional proposal describe=
d a number of mental models for optinoal&lt;&gt; and chose &quot;T with one=
 more value&quot;.=A0 If that is the model, then acting like T is more impo=
rtant than acting like tuple.<br>
<br></div><div>Tony<br><br></div><div>=A0<br></div></div><br></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 />

--001a11c34a3a79194504dbd59811--

.
