220 16868 <5e2dc502-beff-4bbb-8dce-13fb3200415d@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Alexander Nikolov <sasho648@mail.bg>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Post-fix operator declaration change.
Date: Sun, 8 Mar 2015 15:08:51 -0700 (PDT)
Lines: 239
Approved: news@gmane.org
Message-ID: <5e2dc502-beff-4bbb-8dce-13fb3200415d@isocpp.org>
References: <aeaa36aa-8add-4730-ae9b-0129668cea73@isocpp.org>
 <dbf9cbb1-6ee4-4841-b5ca-cd8cbf877607@isocpp.org>
 <abd6b5fe-4e63-4306-8cac-3d185721bfa8@isocpp.org>
 <CAMmfjbMdacchj2OaJPcQTHc-3O7P0pH6j3-0uj6UETubhZHp7g@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_453_1872207078.1425852531278"
X-Trace: ger.gmane.org 1425852536 5582 80.91.229.3 (8 Mar 2015 22:08:56 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 8 Mar 2015 22:08:56 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDBNZXHN2QPRB44Q6OTQKGQET5GOLIY@isocpp.org Sun Mar 08 23:08:55 2015
Return-path: <std-proposals+bncBDBNZXHN2QPRB44Q6OTQKGQET5GOLIY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qg0-f71.google.com ([209.85.192.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDBNZXHN2QPRB44Q6OTQKGQET5GOLIY@isocpp.org>)
	id 1YUjNV-0006OI-K4
	for gclcip-std-proposals@m.gmane.org; Sun, 08 Mar 2015 23:08:53 +0100
Original-Received: by qgfl89 with SMTP id l89sf86321320qgf.0
        for <gclcip-std-proposals@m.gmane.org>; Sun, 08 Mar 2015 15:08:52 -0700 (PDT)
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:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=i0uMPHThs4vUM3BbWFpzqcuTR7qkl81K6BI4Pj2aOLY=;
        b=UuI8EHebZ0YKY8rY+p9Oc+c42FxPc0fXrotn1C0Mu+nq4U5l0lR4mod3LFuDQnyvFo
         XDlWUmMVZeC0zHzvAB5eow/jNCTy86LTdZPpXpSI4/lv0mx3B6mvCFHRRZr02mbDRwGC
         iYp3eDGjj5crhxUCqZdqgoQX7/mV0+S0HvlSdhUiM/cdEtt8zewO+IiEI/zD0BcT/448
         nVIMTI2c6Rd4oTXfQH/I/eNgREkxNrCmjX+oqYXDQcnhlRyxSruT0d9ZQMLWddZ6BdTa
         B8X/LPPoogO31v/a4UDB27NEjaojbJLJQCiDCoSjuYyg6phVg159CBCJEklGfpN86Fxl
         xU7A==
X-Gm-Message-State: ALoCoQkxjYheZKmpDjpugYSwq2a/83SoHvD+W5DC+thXhUIkrA8HSv0QHkVMr//GC0Tw3ExjAtQU
X-Received: by 10.236.18.232 with SMTP id l68mr23809606yhl.16.1425852532198;
        Sun, 08 Mar 2015 15:08:52 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.83.116 with SMTP id i107ls1176856qgd.41.gmail; Sun, 08 Mar
 2015 15:08:51 -0700 (PDT)
X-Received: by 10.140.48.97 with SMTP id n88mr381514qga.35.1425852531682;
        Sun, 08 Mar 2015 15:08:51 -0700 (PDT)
In-Reply-To: <CAMmfjbMdacchj2OaJPcQTHc-3O7P0pH6j3-0uj6UETubhZHp7g@mail.gmail.com>
X-Original-Sender: sasho648@mail.bg
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>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:16868
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/16868>

------=_Part_453_1872207078.1425852531278
Content-Type: multipart/alternative; 
	boundary="----=_Part_454_1253964102.1425852531278"

------=_Part_454_1253964102.1425852531278
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8F, 8 =D0=BC=D0=B0=D1=80=D1=82 2015 =D0=
=B3., 22:44:33 UTC+2, Brian Bi =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0:
>
> Before calling the decision "idiotic", you should read *The Design and=20
> Evolution of C++* and understand for yourself the factors under=20
> consideration at the time.
>
> On Sun, Mar 8, 2015 at 9:38 AM, Alexander Nikolov <sash...@mail.bg=20
> <javascript:>> wrote:
>
>> You mean that it is not worth fixing obvious idiotic decisions?
>>
>> If compatibility is you concern - you may note that it's lost gone and=
=20
>> everybody knows that.
>>
>> =D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8F, 8 =D0=BC=D0=B0=D1=80=D1=82 2015 =
=D0=B3., 18:21:29 UTC+2, Matheus Izvekov =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=
=B0:
>>
>>> Ship has sailed too long ago?
>>>
>>> On Sunday, March 8, 2015 at 12:54:41 PM UTC-3, Alexander Nikolov wrote:
>>>>
>>>> Wouldn't it be better instead of taking one dummy parameter=20
>>>> the user-defined function which implements the post-fix ++ or -- opera=
tor=20
>>>> to have declaration similar to the form:
>>>>
>>>> operator ~--()
>>>>
>>>> I personally think that this is a lot more clear then:
>>>>
>>>> operator --(int);
>>>>
>>>> In which the only one function parameter of type 'int' will have a=20
>>>> dummy value of '0' when instanced.
>>>>
>>>> What do you think?
>>>>
>>>>  --=20
>>
>> ---=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:>.
>> Visit this group at=20
>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>
>
>
>
> --=20
> *Brian Bi*
>

OK - I read it and as far as I can see he (Bjarne Stroustrup) considered=20
adding new keywords - 'prefix' and 'postfix' but didn't choice to make them=
=20
because he 'received the usual howl of outrage from people who dislike new=
=20
keywords.'. He also considered a variant in which the post-fix operator=20
functions would look like this:

++operator()

--operator()

Although he never mentioned why this was not implemented I can make a guess=
=20
that the reason is some kind of interpreter ambiguity or possibly difficult=
=20
implementation.

However my idea was never mentioned - using this special combination of 2=
=20
operators - ~ and -- which is neither harder to implement or creates any=20
kind of ambiguity. So I guess you are the one who haven't read this book or=
=20
else I don't know what your arguments are. However the important part is if=
=20
we can change this now.

Even he says that:

These explanations are needed because the mechanism is unique and therefore=
=20
> a
> bit of a wart.=20
> *Given a choice, I would probably have introduced the prefix andpostfix=
=20
> keywords, but that didn't appear feasible at the time.* However, the only
> really important point is that the mechanism works and can be understood=
=20
> and used
> by the few programmers. who really need it.

--=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_454_1253964102.1425852531278
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8F, 8 =D0=BC=D0=
=B0=D1=80=D1=82 2015 =D0=B3., 22:44:33 UTC+2, Brian Bi =D0=BD=D0=B0=D0=BF=
=D0=B8=D1=81=D0=B0:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"ltr">Before calling the decision "idiotic", you should read <i>The Design =
and Evolution of C++</i> and understand for yourself the factors under cons=
ideration at the time.<br><div><br><div class=3D"gmail_quote">On Sun, Mar 8=
, 2015 at 9:38 AM, Alexander Nikolov <span dir=3D"ltr">&lt;<a href=3D"javas=
cript:" target=3D"_blank" gdf-obfuscated-mailto=3D"c1Y5Fir8ohUJ" rel=3D"nof=
ollow" onmousedown=3D"this.href=3D'javascript:';return true;" onclick=3D"th=
is.href=3D'javascript:';return true;">sash...@mail.bg</a>&gt;</span> wrote:=
<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">You mean that it is not=
 worth fixing obvious idiotic decisions?<div><br></div><div>If&nbsp;compati=
bility&nbsp;is you concern - you may note that it's lost gone and everybody=
 knows that.<br><br>=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8F, 8 =D0=BC=D0=B0=D1=
=80=D1=82 2015 =D0=B3., 18:21:29 UTC+2, Matheus Izvekov =D0=BD=D0=B0=D0=BF=
=D0=B8=D1=81=D0=B0:<div><div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div d=
ir=3D"ltr">Ship has sailed too long ago?<br><br>On Sunday, March 8, 2015 at=
 12:54:41 PM UTC-3, Alexander Nikolov wrote:<blockquote class=3D"gmail_quot=
e" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr">Wouldn't it be better instead of taking one dummy=
 parameter the&nbsp;user-defined function which implements the post-fix ++ =
or -- operator to have declaration similar to the form:<br><br><div style=
=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;background-color=
:rgb(250,250,250)"><code><div><span style=3D"color:#008">operator</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#660">~--()</span></di=
v></code></div><div><br></div><div>I personally think that this is a lot mo=
re clear then:</div><div><br></div><div><div style=3D"border:1px solid rgb(=
187,187,187);word-wrap:break-word;background-color:rgb(250,250,250)"><code>=
<div><span style=3D"color:#008">operator</span><span style=3D"color:#000"> =
</span><span style=3D"color:#660">--(</span><span style=3D"color:#008">int<=
/span><span style=3D"color:#660">);</span></div></code></div><br>In which t=
he only one function parameter of type 'int' will have a dummy value of '0'=
 when instanced.<br><br>What do you think?<br></div><div><br></div></div></=
blockquote></div></blockquote></div></div></div></div><div><div>

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
c1Y5Fir8ohUJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'javascript:';ret=
urn true;" onclick=3D"this.href=3D'javascript:';return true;">std-proposal.=
...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"c1Y5Fir8ohUJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D'javascript:';return true;" onclick=3D"this.href=3D'javascript:=
';return true;">std-pr...@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=
=3D'http://groups.google.com/a/isocpp.org/group/std-proposals/';return true=
;" onclick=3D"this.href=3D'http://groups.google.com/a/isocpp.org/group/std-=
proposals/';return true;">http://groups.google.com/a/<wbr>isocpp.org/group/=
std-<wbr>proposals/</a>.<br>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br><div><div d=
ir=3D"ltr"><div><div dir=3D"ltr"><font color=3D"#c0c0c0"><i>Brian Bi</i></f=
ont></div></div></div></div></div></div></blockquote><div><br></div><div>OK=
 - I read it and as far as I can see he (Bjarne Stroustrup) considered addi=
ng new keywords - 'prefix' and 'postfix' but didn't choice to make them bec=
ause he 'received the usual howl of outrage from people who dislike new key=
words.'. He also considered a variant in which the post-fix operator functi=
ons would look like this:<br><br><div></div></div><div class=3D"prettyprint=
" style=3D"border: 1px solid rgb(187, 187, 187); word-wrap: break-word; bac=
kground-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div class=
=3D"subprettyprint"><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">++</span><span style=3D"color: #008;" class=3D"styled-by-prettify">opera=
tor</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span>=
<span style=3D"color: #660;" 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">()</span></div></code></div=
><div><br></div><div>Although he never mentioned why this was not implement=
ed I can make a guess that the reason is some kind of interpreter ambiguity=
 or possibly difficult implementation.</div><div><br></div><div>However my =
idea was never mentioned - using this special combination of 2 operators - =
~ and -- which is neither harder to implement or creates any kind of ambigu=
ity. So I guess you are the one who haven't read this book or else I don't =
know what your arguments are. However the important part is if we can chang=
e this now.</div><div><br></div><div>Even he says that:</div><div><br><bloc=
kquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-lef=
t-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: sol=
id; padding-left: 1ex;">These explanations are needed because the mechanism=
 is unique and therefore a<br>bit of a wart. <b>Given a choice, I would pro=
bably have introduced the prefix and<br>postfix keywords, but that didn't a=
ppear feasible at the time.</b> However, the only<br>really important point=
 is that the mechanism works and can be understood and used<br>by the few p=
rogrammers. who really need it.</blockquote></div></div>

<p></p>

-- <br />
<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 <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_454_1253964102.1425852531278--
------=_Part_453_1872207078.1425852531278--

.
