220 25214 <7ca90cde-f8d6-435b-97c1-5474490d1001@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Omer Rosler <omer.rosler@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Post-fix operator declaration change.
Date: Tue, 15 Mar 2016 06:29:50 -0700 (PDT)
Lines: 258
Approved: news@gmane.org
Message-ID: <7ca90cde-f8d6-435b-97c1-5474490d1001@isocpp.org>
References: <aeaa36aa-8add-4730-ae9b-0129668cea73@isocpp.org>
 <f3556af9-4483-49cc-a1f3-2603ed0aa95f@isocpp.org>
 <22101a9e-0e9a-4e70-b332-a1cd9ced7eb6@isocpp.org>
 <CAFk2RUbo=vRuUSxLPkWZABmLVN5jq7JxyxuH7Fkz5s33KaD9oA@mail.gmail.com>
 <bce5f14b-81f0-4626-93c0-d26beacbcb48@isocpp.org>
 <CAFk2RUauHNNU-4dHLL+L30pBFELbehR--kbPwNHP5jEQX=SOpQ@mail.gmail.com>
 <8e0337ea-ec51-464e-b45d-06d1b4a91839@isocpp.org>
 <69e71162-a69d-41a8-b48c-d6eef8a46208@isocpp.org>
 <78c5c7c6-2a1c-4dac-aabd-916685cfc48a@isocpp.org>
 <CAD6_Qj_o64bWjyF5EWBG4k=75JVNnOQ-GjN-osEawf49csNP3Q@mail.gmail.com>
 <CAOHCbiuQ8aSisYsZqrNX_e=V68TV8DC=vGx995y=zs5ah9L4Jw@mail.gmail.com>
 <f28acaca-0994-4f91-b0d6-2fef5635ca70@isocpp.org>
 <CAOfiQqk5kasKdb9O8sxQM4_NA5C9VqYhBKeFAnEa6aoTq_t7ZQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_94_456540400.1458048590978"
X-Trace: ger.gmane.org 1458048597 9815 80.91.229.3 (15 Mar 2016 13:29:57 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 15 Mar 2016 13:29:57 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC2L3NWCRYJBBT44UC3QKGQEI5LJ6ZA@isocpp.org Tue Mar 15 14:29:56 2016
Return-path: <std-proposals+bncBC2L3NWCRYJBBT44UC3QKGQEI5LJ6ZA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f198.google.com ([209.85.161.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC2L3NWCRYJBBT44UC3QKGQEI5LJ6ZA@isocpp.org>)
	id 1afp2o-0003qB-F1
	for gclcip-std-proposals@m.gmane.org; Tue, 15 Mar 2016 14:29:54 +0100
Original-Received: by mail-yw0-f198.google.com with SMTP id n3sf28237710ywd.3
        for <gclcip-std-proposals@m.gmane.org>; Tue, 15 Mar 2016 06:29:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=SLj+R+QG/OBGm/FLZ+Pn9oTuwcrpnLP8yN/PwWmpLeA=;
        b=j8bFV9gqySyAtCgeYeqwR2w5quDSG3p90biXkB95NTOOAVAkmz2lMt3clJ4sxQ3s8w
         Khg3J0XEh5qzqceA22nycKYIHO2myCSfF42UuoHovP+lbHR3ocKalxyu3ymNNzk7lF54
         SwAlS3flWwjNuWxjrZFvcZIBFEvOIaQ4MuMF6CXc14whjNSaT60HEbaLq5rCMScpqLSZ
         e9BDJ0fQuq3Ub3/X4H83PcZpQm9Aj1z5/kO+8DydauNubRZT1zzlX9esi2+9fxSkVe43
         RYaNlCuWPugYcjlhwsgnx3xr+S6YzE7eMenfJV6BErHTf69LiOVnlEOy0XVvOCZPOUVA
         rk8w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=SLj+R+QG/OBGm/FLZ+Pn9oTuwcrpnLP8yN/PwWmpLeA=;
        b=poEF5jzrqcKDNTla+O/QWD8sYXeZB0B/VIMwMKikERfcMj2/th2DDTYWYTSRJy06FE
         joCc1N3Kf9T4HUjGL+b8HhSj0qk4ZAbyx8JxNYkM4SDtVmXsgb4SI4l5Upn+Temul8ie
         an78dADEfK+heBdHTGGfvSkiIRl+Yw6NAwXvyNKUzRsqjzD5GMGui+r8/4kUOv3WeDLs
         RfgpRk8sUFwGLU395B9z8L8Gb87W9ET6lEK6039c9W0B2e1ANOhZ7+mfEbcIpM8EaM++
         nqwB8xFvxhsWeYXia9zyh9cZ+o5PznOl33E1cBCS4EeTUtVlKx3RuVJ8WAXDw27JOsPa
         PZOA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=SLj+R+QG/OBGm/FLZ+Pn9oTuwcrpnLP8yN/PwWmpLeA=;
        b=DDVxb1l2Ip7WjsyUA+hfyZ2op4dB8t1PdPykRgPvVREMMhfEKdzIuAs1Z6B05+2dOv
         oPlALaY4KXgcZXXDlFwILedbx6g9PeI/P4K3bic35WRm0/IgdRNx/aWI+cg0WM48MKOZ
         y2HFVANGfxNBSg3Wu41F3KrRIrASAx08qdjZhFytI/FuhToYZd3pZHHDzQFNKcFBCBbZ
         h6M2BRihX67Gqe9/wLweQok9e/cIcUhPiAjRjjN/BCnUmGj2iiqEe9/d10q8UsUauNKI
         0ahQtB0VaA4vI2dRMsqVn2dgWujjusuy+Fe26sTD4oamYVL4feLXA0EXnv3rCdzXzbqj
         e9DQ==
X-Gm-Message-State: AD7BkJIUrvgKG1m75bDaXMVJEFbQoNucqL63pTR3Brzw8XCeStbCQicAH2Tdxt8tZ40FKg==
X-Received: by 10.129.157.71 with SMTP id u68mr22017309ywg.47.1458048593532;
        Tue, 15 Mar 2016 06:29:53 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.29.5 with SMTP id f5ls1217247igh.30.canary; Tue, 15 Mar
 2016 06:29:51 -0700 (PDT)
X-Received: by 10.50.103.68 with SMTP id fu4mr390626igb.9.1458048591579;
        Tue, 15 Mar 2016 06:29:51 -0700 (PDT)
In-Reply-To: <CAOfiQqk5kasKdb9O8sxQM4_NA5C9VqYhBKeFAnEa6aoTq_t7ZQ@mail.gmail.com>
X-Original-Sender: omer.rosler@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:25214
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/25214>

------=_Part_94_456540400.1458048590978
Content-Type: multipart/alternative; 
	boundary="----=_Part_95_676631806.1458048590978"

------=_Part_95_676631806.1458048590978
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Sorry for the late response,
Those aliases look more like a patch than an actual solution.
As I see it, it's a problem of the core the language so a language solution=
=20
is more appropriate (but maybe that's just me).
With a different grammer there is a clear path to eradicate this oddity=20
from new code and maybe with tools, as suggested upthread, from existing=20
code (and maybe even deprecation and removal, but that would be many years=
=20
from now).


On Thursday, March 10, 2016 at 2:36:24 AM UTC+2, Richard Smith wrote:
>
> On Wed, Mar 9, 2016 at 3:35 PM, Omer Rosler <omer....@gmail.com=20
> <javascript:>> wrote:=20
> > Hi, I just came across this old thread and thought why not simply add=
=20
> > `prefix` and `postfix` as contextual keywords, such that the following=
=20
> > declarations are equivalent:=20
> > X T::operator++();=20
> > X T::operator++() prefix;=20
> > //and=20
> > X T::operator++(int);=20
> > X T::operator++() postfix;=20
> >=20
> > (same with `--` and non-member versions)=20
> >=20
> > This has both backward compatability and clear intent.=20
> > If those keywords would be a part of the operator signature in some way=
,=20
> > there is no ambiguity between the pre/post versions.=20
> > Any thoughts?=20
>
> From upthread:=20
>
>   using prefix =3D void;=20
>   using postfix =3D int;=20
>
>   X T::operator++(prefix);=20
>   X T::operator++(postfix);=20
>
> ... works with existing compilers today.=20
>
> > On Wednesday, March 18, 2015 at 12:18:30 AM UTC+2, Tony V E wrote:=20
> >>=20
> >>=20
> >>=20
> >> On Tue, Mar 17, 2015 at 9:03 AM, David Rodr=C3=ADguez Ibeas <dib...@ie=
ee.org>=20
>
> >> wrote:=20
> >>>=20
> >>> Additionally, in the grand scheme of things I expect a C++ developer=
=20
> to=20
> >>> be able to switch from one standard to another, from a legacy project=
=20
> to the=20
> >>> newest green fields task with the newest (even experimental) compiler=
..=20
>  If=20
> >>> the concern is that the old construct is *hard*, the alternative is=
=20
> having=20
> >>> to learn the same *hard* construct and a different one that might be=
=20
> >>> simpler.  This is not _overall_ simplifying the language but making i=
t=20
> more=20
> >>> complex.  If this was adopted, I would have to expect my developers t=
o=20
> >>> understand 'operator++(int)' and whatever form fo=20
> 'operator++(postfix)',=20
> >>> together with the understanding that they have to be mutually=20
> exclusive.=20
> >>>=20
> >>=20
> >> We can, eventually, stop learning old constructs.  ie The 'register'=
=20
> >> keyword and the old version of 'auto'.  Maybe some day we will=20
> deprecate=20
> >> typedef.  It just takes a long long time.=20
> >>=20
> >> The question is just when is it worth it.  Probably isn't worth it in=
=20
> this=20
> >> case.=20
> >>=20
> >>=20
> > --=20
> > You received this message because you are subscribed to the Google=20
> Groups=20
> > "ISO C++ Standard - Future Proposals" group.=20
> > To unsubscribe from this group and stop receiving emails from it, send=
=20
> an=20
> > email to std-proposal...@isocpp.org <javascript:>.=20
> > To post to this group, send email to std-pr...@isocpp.org <javascript:>=
..=20
>
> > To view this discussion on the web visit=20
> >=20
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f28acaca-099=
4-4f91-b0d6-2fef5635ca70%40isocpp.org.=20
>
>

--=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/7ca90cde-f8d6-435b-97c1-5474490d1001%40isocpp.or=
g.

------=_Part_95_676631806.1458048590978
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Sorry for the late response,<div>Those aliases look more l=
ike a patch than an actual solution.</div><div>As I see it, it&#39;s a prob=
lem of the core the language so a language solution is more appropriate (bu=
t maybe that&#39;s just me).</div><div>With a different grammer there is a =
clear path to eradicate this oddity from new code and maybe with tools, as =
suggested upthread, from existing code (and maybe even deprecation and remo=
val, but that would be many years from now).</div><div><br><br>On Thursday,=
 March 10, 2016 at 2:36:24 AM UTC+2, Richard Smith wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;">On Wed, Mar 9, 2016 at 3:35 PM, Omer Rosler &lt=
;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"gYDsEoi=
5BgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39;;re=
turn true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;">omer=
.....@gmail.com</a>&gt; wrote:
<br>&gt; Hi, I just came across this old thread and thought why not simply =
add
<br>&gt; `prefix` and `postfix` as contextual keywords, such that the follo=
wing
<br>&gt; declarations are equivalent:
<br>&gt; X T::operator++();
<br>&gt; X T::operator++() prefix;
<br>&gt; //and
<br>&gt; X T::operator++(int);
<br>&gt; X T::operator++() postfix;
<br>&gt;
<br>&gt; (same with `--` and non-member versions)
<br>&gt;
<br>&gt; This has both backward compatability and clear intent.
<br>&gt; If those keywords would be a part of the operator signature in som=
e way,
<br>&gt; there is no ambiguity between the pre/post versions.
<br>&gt; Any thoughts?
<br>
<br>From upthread:
<br>
<br>=C2=A0 using prefix =3D void;
<br>=C2=A0 using postfix =3D int;
<br>
<br>=C2=A0 X T::operator++(prefix);
<br>=C2=A0 X T::operator++(postfix);
<br>
<br>... works with existing compilers today.
<br>
<br>&gt; On Wednesday, March 18, 2015 at 12:18:30 AM UTC+2, Tony V E wrote:
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt; On Tue, Mar 17, 2015 at 9:03 AM, David Rodr=C3=ADguez Ibeas &l=
t;<a>dib...@ieee.org</a>&gt;
<br>&gt;&gt; wrote:
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Additionally, in the grand scheme of things I expect a C++=
 developer to
<br>&gt;&gt;&gt; be able to switch from one standard to another, from a leg=
acy project to the
<br>&gt;&gt;&gt; newest green fields task with the newest (even experimenta=
l) compiler. =C2=A0If
<br>&gt;&gt;&gt; the concern is that the old construct is *hard*, the alter=
native is having
<br>&gt;&gt;&gt; to learn the same *hard* construct and a different one tha=
t might be
<br>&gt;&gt;&gt; simpler. =C2=A0This is not _overall_ simplifying the langu=
age but making it more
<br>&gt;&gt;&gt; complex. =C2=A0If this was adopted, I would have to expect=
 my developers to
<br>&gt;&gt;&gt; understand &#39;operator++(int)&#39; and whatever form fo =
&#39;operator++(postfix)&#39;,
<br>&gt;&gt;&gt; together with the understanding that they have to be mutua=
lly exclusive.
<br>&gt;&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt; We can, eventually, stop learning old constructs. =C2=A0ie The=
 &#39;register&#39;
<br>&gt;&gt; keyword and the old version of &#39;auto&#39;. =C2=A0Maybe som=
e day we will deprecate
<br>&gt;&gt; typedef. =C2=A0It just takes a long long time.
<br>&gt;&gt;
<br>&gt;&gt; The question is just when is it worth it. =C2=A0Probably isn&#=
39;t worth it in this
<br>&gt;&gt; case.
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt; --
<br>&gt; You received this message because you are subscribed to the Google=
 Groups
<br>&gt; &quot;ISO C++ Standard - Future Proposals&quot; group.
<br>&gt; To unsubscribe from this group and stop receiving emails from it, =
send an
<br>&gt; email to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-=
mailto=3D"gYDsEoi5BgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;ja=
vascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;r=
eturn true;">std-proposal...@<wbr>isocpp.org</a>.
<br>&gt; To post to this group, send email to <a href=3D"javascript:" targe=
t=3D"_blank" gdf-obfuscated-mailto=3D"gYDsEoi5BgAJ" rel=3D"nofollow" onmous=
edown=3D"this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.hr=
ef=3D&#39;javascript:&#39;;return true;">std-pr...@isocpp.org</a>.
<br>&gt; To view this discussion on the web visit
<br>&gt; <a href=3D"https://groups.google.com/a/isocpp.org/d/msgid/std-prop=
osals/f28acaca-0994-4f91-b0d6-2fef5635ca70%40isocpp.org" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/f28acaca-0994-4f91-b0d6-2fef5635ca70%40i=
socpp.org&#39;;return true;" onclick=3D"this.href=3D&#39;https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/f28acaca-0994-4f91-b0d6-2fef5635=
ca70%40isocpp.org&#39;;return true;">https://groups.google.com/a/<wbr>isocp=
p.org/d/msgid/std-<wbr>proposals/f28acaca-0994-4f91-<wbr>b0d6-2fef5635ca70%=
40isocpp.org</a><wbr>.
<br></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/7ca90cde-f8d6-435b-97c1-5474490d1001%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/7ca90cde-f8d6-435b-97c1-5474490d1001=
%40isocpp.org</a>.<br />

------=_Part_95_676631806.1458048590978--
------=_Part_94_456540400.1458048590978--

.
