220 29005 <71dea059-b425-4b2d-966c-ef2ea90ca968@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: FrankHB1989 <frankhb1989@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Is World's Dumbest Pointer still on the table?!?
Date: Thu, 20 Oct 2016 03:02:02 -0700 (PDT)
Lines: 199
Approved: news@gmane.org
Message-ID: <71dea059-b425-4b2d-966c-ef2ea90ca968@isocpp.org>
References: <8a6731f7-1c9b-482d-817e-c2374fc9ae1b@isocpp.org>
 <nu53qp$lvv$1@blaine.gmane.org> <7d817482-e7c3-4724-9501-738d4c9083d7@isocpp.org>
 <CAFk2RUYggLMwivpFr+thZmRBUXBgXC283iwAvyRQEnbT7xrqUA@mail.gmail.com>
 <f3d2848e-56f7-4ddd-a0a0-1a8c7b8db391@isocpp.org>
 <986ffd0c-7466-476a-96af-525aaf8b24ea@isocpp.org>
 <eb8e8936-fa1b-4087-8dc0-1a76e4f0c6a5@isocpp.org>
 <5adf05e5-edb4-4706-816b-59b71d5c1a6f@isocpp.org>
 <3241f484-0d5a-4363-8ddd-d3813a54fcb1@isocpp.org>
 <a17356b2-2545-444a-9db5-98c36d90c6f4@isocpp.org>
 <b445c725-6b63-4055-82f4-3e73fe045755@isocpp.org>
 <0c7c0968-f1c2-46df-b787-631fdd9f2d6c@isocpp.org>
 <39f69270-f3f8-412c-82ac-f192d2642185@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_94_1564122504.1476957722193"
X-Trace: blaine.gmane.org 1476957756 8318 195.159.176.226 (20 Oct 2016 10:02:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 20 Oct 2016 10:02:36 +0000 (UTC)
Cc: mihailnajdenov@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCTJVBPG3QIBBHFMULAAKGQERLFFYKY@isocpp.org Thu Oct 20 12:02:28 2016
Return-path: <std-proposals+bncBCTJVBPG3QIBBHFMULAAKGQERLFFYKY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCTJVBPG3QIBBHFMULAAKGQERLFFYKY@isocpp.org>)
	id 1bxAAk-0006aZ-S9
	for gclcip-std-proposals@m.gmane.org; Thu, 20 Oct 2016 12:02:03 +0200
Original-Received: by mail-yw0-f199.google.com with SMTP id t193sf110352437ywc.0
        for <gclcip-std-proposals@m.gmane.org>; Thu, 20 Oct 2016 03:02:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc: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=9ndrkAFrS2Eu9PYZCHWmNfQBwvpv+ssiwQdMAkN1S8c=;
        b=qEc1P8js418I6visl7IsV3RFqx14zX7XZGeV6Dg7hrPIE2XI02nlp5lqETW87QmUi4
         c3ytClwQtjsqywvLJVGo6jx0bbGeNf+GqmNcOh8tL7lvcchw0iPIFTXS0NjizK6JyOQC
         CPtPbJ5dqLdH8Wu6v8cPLejbv9yu/BfLZ6TnmQvA2zUsjsX+twfvHo9yF33txoj88vpe
         2FHPOql5Lqg0vUG4Ni6I2tkiNSL9YCgz2jzmETkrEC+ntToEn2o7X8XmNtWpLFpsYodu
         VY1rwlweTsN36MWQKjti9rZPcj0SLwtlsDz0z+vaqDfp3fYxqZR0+JImWa2FS5fIk6Nz
         8c4Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc: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=9ndrkAFrS2Eu9PYZCHWmNfQBwvpv+ssiwQdMAkN1S8c=;
        b=lD02qDGiEvFcS9vcnTANh97egtYeBnxQhZawTKCwwnG9K9auFM3u7BApK4ztHKbHbN
         Z/c4qGPVRK911bwgOwjOZI8ihCh0KD9f5GLfn7OyFfV3rV7H+nDLkQQ1zgYAw5ZVuPe2
         oUmZO5tVVZgnHCHhP3oUsx9HlCgllTE1BdAFQ/xINU3YPI4Bz6b2TsY61Jzm1gG5pvaT
         QkfUFdI5G540vWAzNVaYyiSJk4+Se3gdJiejv3AzVdNPr6agYg8XwX1N9JBiMWk3W8m5
         vFNBnm7BjDATTaJ1ZMojrS7DV1v6lCb0BVXOhwDSQ0rSyd35ADte0hRluNxVdsY+UK3z
         KG0A==
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:cc: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=9ndrkAFrS2Eu9PYZCHWmNfQBwvpv+ssiwQdMAkN1S8c=;
        b=KvtPPpkr3bJ3pPW81nFtMNdzn/GLkIRdaTpa18/dEVaRK1pfY5nVIYmas/DhiApesS
         xAIX5RkaX5/vBz0BzBGi6tAaghQzNHfsEToGcNT3CTrJQozpB/vlr3JAnvxq2XYcq0nx
         63H0k5M1WvzozxBRLvQfROCoJ6mmfq5JtuWZd56LG1ZxC6b+SeOMH7/lJwEjmBSSiuHk
         tTYftBmugdSuRqTz6O+zXbFPVc9xpd8A4GJy8FtCY9KMZ+a9eBtIxlAS/dbS+fi3TUL5
         5JZhfV8bO/PVMadvOCnjN1UKzH49KIbEDHvC59RYVNhURP53+cn7uNikMh2JsuukFgHk
         h0UQ==
X-Gm-Message-State: AA6/9RnlqMpiCEoPe6y574iLjkRI6m2un9DURl3s4Ro9+Vtn7vg10owZceSaNrtZy9P/Hg==
X-Received: by 10.13.243.198 with SMTP id c189mr3329619ywf.158.1476957725057;
        Thu, 20 Oct 2016 03:02:05 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.7.39 with SMTP id 39ls1488199ioh.39.gmail; Thu, 20 Oct
 2016 03:02:03 -0700 (PDT)
X-Received: by 10.36.190.137 with SMTP id i131mr937744itf.8.1476957723892;
        Thu, 20 Oct 2016 03:02:03 -0700 (PDT)
In-Reply-To: <39f69270-f3f8-412c-82ac-f192d2642185@isocpp.org>
X-Original-Sender: frankhb1989@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: <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:29005
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29005>

------=_Part_94_1564122504.1476957722193
Content-Type: multipart/alternative; 
	boundary="----=_Part_95_966278194.1476957722193"

------=_Part_95_966278194.1476957722193
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



=E5=9C=A8 2016=E5=B9=B410=E6=9C=8819=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89 UT=
C+8=E4=B8=8B=E5=8D=886:42:04=EF=BC=8Cmihailn...@gmail.com=E5=86=99=E9=81=93=
=EF=BC=9A
>
>
>
> On Wednesday, October 19, 2016 at 1:29:04 PM UTC+3, FrankHB1989 wrote:
>>
>>
>>
>> =E5=9C=A8 2016=E5=B9=B410=E6=9C=8819=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89=
 UTC+8=E4=B8=8B=E5=8D=885:58:55=EF=BC=8Cmihailn...@gmail.com=E5=86=99=E9=81=
=93=EF=BC=9A
>>>
>>>
>>>
>>> On Wednesday, October 19, 2016 at 12:38:30 PM UTC+3, FrankHB1989 wrote:
>>>>
>>>>
>>>>
>>>> =E5=9C=A8 2016=E5=B9=B410=E6=9C=8819=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=
=89 UTC+8=E4=B8=8B=E5=8D=884:30:37=EF=BC=8Cmihailn...@gmail.com=E5=86=99=E9=
=81=93=EF=BC=9A
>>>>>
>>>>> Ok,=20
>>>>> I hope we all agree reset(T*) and release() have new meaning in the=
=20
>>>>> context of a observer_ptr. Ok?
>>>>>
>>>>> For you, it is not a problem - the class is free to add whatever=20
>>>>> meaning it wants to.
>>>>>
>>>>> I simply argue, it can well be a problem and potentially adding a=20
>>>>> confusion.
>>>>>
>>>>> auto p =3D foo();
>>>>>
>>>>> if(cond(p))
>>>>>  p.reset(hello.getBar());
>>>>>
>>>>>
>>>>>
>>>>> All I am saying, this code above, for current smart pointers, meant -=
=20
>>>>> p now *has* the bar object.
>>>>>
>>>>> With observer_ptr into the picture, it might also mean - p now *point=
s=20
>>>>> to* a bar.
>>>>>
>>>>> For current smart pointers in the standard, it is also true. The=20
>>>> assumption is just further weaken (correctly).
>>>>  ...
>>>>
>>>
>>> Is it, really? For both (all?) smart pointers today, the meaning is the=
=20
>>> same - p is now master of bar. The only difference is, is this ownershi=
p=20
>>> shared with other p clones or not.
>>> Where in the observer case, it is something quite different.=20
>>>
>>> Again, it might well not be a problem, but I don't believe it is a=20
>>> difference to be taken lightly.=20
>>>
>> No. A smart pointer is not necessarily owning, even if all instances in=
=20
>> the current standard are owning. See also=20
>> https://en.wikipedia.org/wiki/Smart_pointer, esp. external links.
>>
> =20
> Of course, but the case in point is all the code written against the=20
> current notions, from both std and other implementations like Qt, and the=
=20
> effect observer will have.
>
I don't see they have defined or suggested such notions of smart pointers.=
=20

> Mind you, I don't argue, observer does something wrong by itself, if take=
n=20
> in isolation.
> I only argue, in the context of older pointer types, this overload use of=
=20
> the old interface is something rather questionable.=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/71dea059-b425-4b2d-966c-ef2ea90ca968%40isocpp.or=
g.

------=_Part_95_966278194.1476957722193
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>=E5=9C=A8 2016=E5=B9=B410=E6=9C=8819=E6=97=A5=E6=
=98=9F=E6=9C=9F=E4=B8=89 UTC+8=E4=B8=8B=E5=8D=886:42:04=EF=BC=8Cmihailn...@=
gmail.com=E5=86=99=E9=81=93=EF=BC=9A<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"><br><br>On Wednesday, October 19, 2016 at 1:29:04 PM=
 UTC+3, FrankHB1989 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"><br><br>=E5=9C=A8 2016=E5=B9=B410=E6=9C=8819=E6=97=A5=E6=98=9F=E6=
=9C=9F=E4=B8=89 UTC+8=E4=B8=8B=E5=8D=885:58:55=EF=BC=8C<a>mihailn...@<wbr>g=
mail.com</a>=E5=86=99=E9=81=93=EF=BC=9A<blockquote class=3D"gmail_quote" st=
yle=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1=
ex"><div dir=3D"ltr"><br><br>On Wednesday, October 19, 2016 at 12:38:30 PM =
UTC+3, FrankHB1989 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"><br><br>=E5=9C=A8 2016=E5=B9=B410=E6=9C=8819=E6=97=A5=E6=98=9F=E6=
=9C=9F=E4=B8=89 UTC+8=E4=B8=8B=E5=8D=884:30:37=EF=BC=8C<a>mihailn...@<wbr>g=
mail.com</a>=E5=86=99=E9=81=93=EF=BC=9A<blockquote class=3D"gmail_quote" st=
yle=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1=
ex"><div dir=3D"ltr"><div>Ok, </div><div>I hope we all agree reset(T*) and =
release() have new meaning in the context of a observer_ptr. Ok?</div><div>=
<br></div><div>For you, it is not a problem - the class is free to add what=
ever meaning it wants to.</div><div><br></div><div>I simply argue, it can w=
ell be a problem and potentially adding a confusion.</div><div><br></div><d=
iv style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;backgrou=
nd-color:rgb(250,250,250)"><code><div><span style=3D"color:#008">auto</span=
><span style=3D"color:#000"> p </span><span style=3D"color:#660">=3D</span>=
<span style=3D"color:#000"> foo</span><span style=3D"color:#660">();</span>=
<span style=3D"color:#000"><br><br></span><span style=3D"color:#008">if</sp=
an><span style=3D"color:#660">(</span><span style=3D"color:#000">cond</span=
><span style=3D"color:#660">(</span><span style=3D"color:#000">p</span><spa=
n style=3D"color:#660">))</span><span style=3D"color:#000"><br>=C2=A0p</spa=
n><span style=3D"color:#660">.</span><span style=3D"color:#000">reset</span=
><span style=3D"color:#660">(</span><span style=3D"color:#000">hello</span>=
<span style=3D"color:#660">.</span><span style=3D"color:#000">getBar</span>=
<span style=3D"color:#660">());</span><span style=3D"color:#000"><br><br></=
span></div></code></div><div><br></div><div><br></div><div>All I am saying,=
 this code above, for current smart pointers, meant - p now <i>has</i> the =
bar object.</div><div><br></div><div>With observer_ptr into the picture, it=
 might also mean - p now <i>points to</i> a bar.</div><div><br></div></div>=
</blockquote><div>For current smart pointers in the standard, it is also tr=
ue. The assumption is just further weaken (correctly).<br>=C2=A0...<br></di=
v></div></blockquote><div><br></div><div>Is it, really? For=C2=A0both (all?=
)=C2=A0smart pointers today,=C2=A0the meaning is the same - p is now master=
 of bar. The only difference is, is this ownership shared with other p clon=
es or not.</div><div>Where in the observer case, it is something quite diff=
erent. </div><div><br></div><div>Again, it might well not be a problem, but=
 I don&#39;t believe it is a difference to be taken lightly. </div></div></=
blockquote><div>No. A smart pointer is not necessarily owning, even if all =
instances in the current standard are owning. See also <a href=3D"https://e=
n.wikipedia.org/wiki/Smart_pointer" rel=3D"nofollow" target=3D"_blank" onmo=
usedown=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fe=
n.wikipedia.org%2Fwiki%2FSmart_pointer\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAF=
QjCNHTmVZBea2puxnrb_pdZDt3R4OhlA&#39;;return true;" onclick=3D"this.href=3D=
&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fen.wikipedia.org%2Fwiki%=
2FSmart_pointer\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHTmVZBea2puxnrb_pdZ=
Dt3R4OhlA&#39;;return true;">https://en.wikipedia.org/wiki/<wbr>Smart_point=
er</a>, esp. external links.<br></div></div></blockquote><div>=C2=A0</div><=
div>Of course, but the case in point is all the code written=C2=A0against t=
he current notions, from both std and other implementations like Qt, and th=
e effect observer will have.</div></div></blockquote><div>I don&#39;t see t=
hey have defined or suggested such notions of smart pointers. <br></div><bl=
ockquote 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>Mind you, I=
 don&#39;t argue, observer does something wrong by itself, if taken in isol=
ation.</div><div>I only argue, in the context of older pointer types, this =
overload use of the old interface is something rather questionable. </div><=
/div></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/71dea059-b425-4b2d-966c-ef2ea90ca968%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/71dea059-b425-4b2d-966c-ef2ea90ca968=
%40isocpp.org</a>.<br />

------=_Part_95_966278194.1476957722193--

------=_Part_94_1564122504.1476957722193--

.
