220 29008 <f4cf845d-638b-488b-afad-a6de0ab9addd@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: mihailnajdenov@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 04:06:38 -0700 (PDT)
Lines: 184
Approved: news@gmane.org
Message-ID: <f4cf845d-638b-488b-afad-a6de0ab9addd@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>
 <21f90a12-3d1f-4f65-8974-66ee3a17f88d@isocpp.org>
 <6ddbccaf-a7eb-4193-86d0-31300fd2f9ae@isocpp.org>
 <8c24951b-5d86-46e4-85c8-1a9372020dff@isocpp.org>
 <2df66fdb-3586-4ccc-b589-558298b28a56@isocpp.org>
 <10dd3035-5546-414c-980f-2a1b06b9dd5b@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_130_209579376.1476961598228"
X-Trace: blaine.gmane.org 1476961639 13684 195.159.176.226 (20 Oct 2016 11:07:19 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 20 Oct 2016 11:07:19 +0000 (UTC)
Cc: mihailnajdenov@gmail.com, joseph.thomson@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUJ3A7GRAPRBP6KULAAKGQEVCO5NHI@isocpp.org Thu Oct 20 13:07:11 2016
Return-path: <std-proposals+bncBCUJ3A7GRAPRBP6KULAAKGQEVCO5NHI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f72.google.com ([209.85.213.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUJ3A7GRAPRBP6KULAAKGQEVCO5NHI@isocpp.org>)
	id 1bxBBK-0007ea-AO
	for gclcip-std-proposals@m.gmane.org; Thu, 20 Oct 2016 13:06:42 +0200
Original-Received: by mail-vk0-f72.google.com with SMTP id q126sf43067324vkd.4
        for <gclcip-std-proposals@m.gmane.org>; Thu, 20 Oct 2016 04:06:44 -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=VzsOlrXbGPuyYEOXmQvQ6qlNtLV1eZ01KTq0pYLQbbk=;
        b=VIiAvSVYip3j5HgWTjy8Wm13xgts6IbcSK8D7zOOyb+wS4CypcEG77mAomJvuJO4N1
         /aCfhvY9S7ZJaIO7z2IfEMt7s1Vp0XIFWR5JKPApOxpvSeBlBd1JcMH3vxTw3JJ77+BA
         Npcc9ik9SMcFHpB9LyzxOBJGfofttCdIMbB1KKG94vJfr0DXGwxx7ReDZclqRbFxEj32
         nGXaSPX0BK0pgcTBV/0ola6nuhE19fH/ftymeZWS5AdVcAbBczDpNoNCdMaNtNhoapOK
         zKu+tzo0d+6kbymx7HG6S250lkdTmmqOepCmBEQJtO8r7UFwaT3amGXunOgMv+riVPVy
         6zdg==
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=VzsOlrXbGPuyYEOXmQvQ6qlNtLV1eZ01KTq0pYLQbbk=;
        b=J5OA2tsIctvizBWt2WDF/WPCl4iOm5WQwVHot8PcrwcFKo7Q5spNgawS6VhoTSpKEr
         FaPRGYelfmDqmX4pmMg+pxV+GaGZkJooCToMnAXjLcPJY7nE3eqXIXNiZ0IG0Lz9ZkxO
         Q/6NGEDyY6p4JsZT7v5DdwpUA+0swxr6Gv/cCnoiK9vC+1OeWyijdpd9YuCnPHnHBouG
         CtszN5BYVagrJ4FdQ8xHWAONdjD0J4TizJbzc/0nlBjBUCYXdYIrDXfSmi37cv4BChEz
         cT2UM+yhRIccaWJWiI7nqWY56tbHAzYJjTWF9nZgin1561x0rlti/X9FU8ozWh/ydEmT
         r3dA==
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=VzsOlrXbGPuyYEOXmQvQ6qlNtLV1eZ01KTq0pYLQbbk=;
        b=FoMLeHOgPbdLNHe0y35cpTrcb9xtD0o7PrGsROMoDbq8dsGr8PnwM7vgy8nwubeeFY
         KrnG76IO7+MFuXg0m3eucAznFad9IOgceicQsrFh8rKQ0XbSYqN9ZynTvPFsdBDz5OpV
         1tFgUS8wrfVsUZFHjewoI33eLc++C13hAd84dvhqR/IJEhLqYMIIog46XDIQTgWOpJId
         7TIeHa06yq7jCPi6TiwcOKNS74UvgVn94dBXj5sFhUvpV38yjZwF00pHzxnEx13qmfLZ
         6K9EX9mMRfpOLyO/e/g8YvkiLccQLaw1CHegi6OPi1trilmwyhyanPSgbvqlYnzRtAJb
         k4XA==
X-Gm-Message-State: AA6/9Rl23K6EZ14PRJiOwxIA0HHDsnz9JEspa6fEDKPPF/kNsp11tmFTl2oKYuNiMJ3+Ng==
X-Received: by 10.31.82.69 with SMTP id g66mr3503909vkb.24.1476961604455;
        Thu, 20 Oct 2016 04:06:44 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.165.141 with SMTP id o135ls1486768ioe.44.gmail; Thu, 20
 Oct 2016 04:06:39 -0700 (PDT)
X-Received: by 10.36.71.141 with SMTP id t135mr948166itb.10.1476961599772;
        Thu, 20 Oct 2016 04:06:39 -0700 (PDT)
In-Reply-To: <10dd3035-5546-414c-980f-2a1b06b9dd5b@isocpp.org>
X-Original-Sender: MihailNajdenov@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:29008
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29008>

------=_Part_130_209579376.1476961598228
Content-Type: multipart/alternative; 
	boundary="----=_Part_131_49941150.1476961598228"

------=_Part_131_49941150.1476961598228
Content-Type: text/plain; charset=UTF-8



On Thursday, October 20, 2016 at 11:45:10 AM UTC+3, joseph....@gmail.com 
wrote:
>
> On Thursday, 20 October 2016 15:09:16 UTC+8, mihailn...@gmail.com wrote:
>>
>> My intentions are not to change your mind - we, as well as everyone else, 
>> are perfectly aware of the pros and cons of both approaches - raw vs new 
>> ptr.
>>
>  
> I think it helps to have these things written down. Even if everyone else 
> knows everything already, it helps me get my thoughts in order and realize 
> where my reasoning is flawed.
>

Agreed. These pros and cons lists are important, so one can see all sides. 
I for one see better now, why people want a view type, most importantly - 
what features they want from it!
 

>
> We also agree, any "operator." (in quotes, not necessarily overloading it) 
>> will dramatically change any possible implementation of such a wrapper 
>> pointer type.
>>
>
> I don't agree with this. I think "operator dot overloading" will have 
> limited to no application in this case. I believe it will have more of an 
> application with types that act to modify select parts of an API while 
> retaining the overall appearance of the underlying type like, for example, 
> propagate_const.
>

Considering all proposals include an impl of a smart reference - it 
certainly will have significant impact. We probably don't want to end up 
with too much observing wrappers. 


And lets be honest, references now are the non-null pointers we are trying 
to invent anew. They are invented for this same purpose ages ago.

IF the downsides of these are solved (a.k.a. smart references), maybe they 
are the right way to handle the observer case.

May be the future is not a pointer type, but a reference type.
After all, they were the first observers out there!
 

>  
>
>> I also agree with you propagate_const should be integral part of such a 
>> wrapper pointer type, not a cumbersome opt-in. 
>>
>
> I'm in two minds about this. It may be better to keep const propagation 
> separate.
>

But we more often need the pointed-to be const, not the pointer.

We write const auto* many times more often then auto*const.

Yes, propagate, will mean const auto*const, so there should be control.

In any case, propagation is not unreasonable default:

It will enable const auto obj = getObj(); to mean what the user probably 
intended to mean!
Vary, very reasonable default. 

It is interesting to note, smart references will suffer from the same 
problem.


> As a result, I (still) strongly believe observer_ptr should *not* go into 
>> the standard in its current form.
>> It will be half-assessed, and will rise as many issues/questions as it 
>> solves and will be become the auto_ptr version of a much better view type. 
>>
>
> Agreed.
>

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f4cf845d-638b-488b-afad-a6de0ab9addd%40isocpp.org.

------=_Part_131_49941150.1476961598228
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Thursday, October 20, 2016 at 11:45:10 AM UTC+3=
, joseph....@gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"mar=
gin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><=
div dir=3D"ltr">On Thursday, 20 October 2016 15:09:16 UTC+8, <a>mihailn...@=
gmail.com</a>  wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;ma=
rgin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r"><div>My intentions are not to change your mind=C2=A0- we, as well as eve=
ryone else, are perfectly aware of the=C2=A0pros and cons of both approache=
s - raw vs new ptr.</div></div></blockquote><div>=C2=A0<br>I think it helps=
 to have these things written down. Even if everyone else knows everything =
already, it helps me get my thoughts in order and realize where my reasonin=
g is flawed.<br></div></div></blockquote><div><br></div><div>Agreed. These =
pros and cons lists are important, so one can see all sides. I for one see =
better now,=C2=A0why people want a view type, most importantly - what featu=
res they want from it!</div><div>=C2=A0</div><blockquote class=3D"gmail_quo=
te" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddi=
ng-left: 1ex;"><div dir=3D"ltr"><div><br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;paddin=
g-left:1ex"><div dir=3D"ltr"><div></div><div>We also agree, any &quot;opera=
tor.&quot; (in quotes, not necessarily overloading it) will dramatically ch=
ange any possible implementation of=C2=A0such a wrapper pointer type.</div>=
</div></blockquote><div><br>I don&#39;t agree with this. I think &quot;oper=
ator dot overloading&quot; will have limited to no application in this case=
.. I believe it will have more of an application with types that act to modi=
fy select parts of an API while retaining the overall appearance of the und=
erlying type like, for example, <span style=3D"font-family:courier new,mono=
space">propagate_const</span>.<br></div></div></blockquote><div><br></div><=
div>Considering all proposals include an impl of a smart reference - it cer=
tainly will have significant impact. We probably don&#39;t want to end up w=
ith too much observing wrappers. </div><div><br></div><div><br></div><div>A=
nd lets be honest, references now are the non-null pointers we are trying t=
o invent anew. They are invented for this same purpose ages ago.</div><div>=
<br></div><div>IF the downsides of these are solved (a.k.a. smart reference=
s), maybe they are the right way to handle the observer case.</div><div><br=
></div><div>May be the future is not a pointer type, but a reference type.<=
/div><div>After all, they were the first observers out there!</div><div>=C2=
=A0</div><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"><div=
>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-lef=
t:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>=
I also=C2=A0agree with you=C2=A0propagate_const should be integral part of =
such a wrapper pointer type, not a cumbersome opt-in.=C2=A0</div></div></bl=
ockquote><div><br>I&#39;m in two minds about this. It may be better to keep=
 const propagation separate.<br></div></div></blockquote><div><br></div><di=
v>But we more often need the pointed-to be const, not the pointer.</div><di=
v><br></div><div>We write const auto* many times more often then auto*const=
..</div><div><br></div><div>Yes, propagate, will mean const auto*const, so t=
here should be control.</div><div><br></div><div>In any case, propagation i=
s not unreasonable default:</div><div><br></div><div>It will enable const a=
uto obj =3D getObj();=C2=A0to mean what the user probably intended to mean!=
</div><div>Vary, very reasonable default. </div><div><br></div><div>It is i=
nteresting to note, smart references will suffer from the same problem.</di=
v><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0;marg=
in-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"=
>As a result, I (still)=C2=A0strongly believe=C2=A0observer_ptr=C2=A0should=
 <b>not</b>=C2=A0go into the standard in its current form.<div>It will be h=
alf-assessed, and will rise as many issues/questions as it solves and will =
be become=C2=A0the=C2=A0auto_ptr version of a much better view type. </div>=
</div></blockquote><div><br>Agreed.<br></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/f4cf845d-638b-488b-afad-a6de0ab9addd%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/f4cf845d-638b-488b-afad-a6de0ab9addd=
%40isocpp.org</a>.<br />

------=_Part_131_49941150.1476961598228--

------=_Part_130_209579376.1476961598228--

.
