220 36533 <c82b2d47-e144-4809-b87a-f70d00d8a7e7@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Masse Nicolas <masse.nicolas@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: What happened to N4282
Date: Sun, 7 Jan 2018 09:07:45 -0800 (PST)
Lines: 112
Approved: news@gmane.org
Message-ID: <c82b2d47-e144-4809-b87a-f70d00d8a7e7@isocpp.org>
References: <CANVf7NXAJ4fgPDsVPAFacHJaiHgGS0wVuUF3XcSQRNLBjkTCVA@mail.gmail.com>
 <fd278536-7104-4aa8-a0fd-bb9788e7c0aa@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_11728_855844777.1515344865180"
X-Trace: blaine.gmane.org 1515344752 20735 195.159.176.226 (7 Jan 2018 17:05:52 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 7 Jan 2018 17:05:52 +0000 (UTC)
Cc: bobfang1992@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCCJBHV4UALBBYVHZHJAKGQE3IKQMRQ@isocpp.org Sun Jan 07 18:05:47 2018
Return-path: <std-proposals+bncBCCJBHV4UALBBYVHZHJAKGQE3IKQMRQ@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+bncBCCJBHV4UALBBYVHZHJAKGQE3IKQMRQ@isocpp.org>)
	id 1eYEOG-0004pu-1i
	for gclcip-std-proposals@m.gmane.org; Sun, 07 Jan 2018 18:05:44 +0100
Original-Received: by mail-vk0-f72.google.com with SMTP id u143sf5801709vkb.0
        for <gclcip-std-proposals@m.gmane.org>; Sun, 07 Jan 2018 09:07:47 -0800 (PST)
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:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=7gRcM8lMUHY2uK9OC4yeJtK7nYTCMg1JvaadzGFuw7M=;
        b=Fr33oF34Jb+HQg/v0/1Kx0X7+zz7YyPaUWzesQDISyBXeA0yseDsrjzO2RcSMoc6ea
         SYTUFBwXVXrqdWSXpdnDVSEUJkMDDXU2HN9W5frtMksqwKZaqNNbNtP3T1B0qn/gj6+i
         Rm7/Z0OCVyyYcS0PdmHdCsuYDKrx+xFqw+60SeGKqgHOJTqXDr/zBJhYYm57tyimSDAj
         z3ajYhhAdnp70BycAzfo/seqAqAX5h4pv4w+SU8azPcjird/iozOQ9mYasKQ0bS0MDvF
         D9Q0bUuZuv7IVvTNI7y7oyuxTKNVYim3evUhsKOAGU4h2pZoksgycHlwj8+PJa0Hec12
         v9BA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=7gRcM8lMUHY2uK9OC4yeJtK7nYTCMg1JvaadzGFuw7M=;
        b=IAbdEb3Kiii6KnZFlEw74IOq2ZP8NC1GpIrpN0Se2IKEjE0+QR5CUz3pAoLAdvXaxJ
         QoT2pcKLNyDxLfTxnV2fvBFsHB3By+uiAH6OKBGcRPdq6BYToJ9zTQILInN3z5hVkzAN
         3ZXUKVmWx8cVQTkSnd/Y9DZTGSwsPG75ChUuMgsbmuZUGXuCYrff32R0OovwMt6gchau
         Bd9ljZN/8HCsxgHxEz14IqZ0r9d00o1RzFphL2REvB4EEz2WEe7CQRyWsau3IVZGaq4f
         RJKCS2EnwIU26KrrJkb9s3qF6l5a9efGZEQHgmL7BoqS5SCnQQi3uFb/weTZF8k/cHcG
         B27w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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=7gRcM8lMUHY2uK9OC4yeJtK7nYTCMg1JvaadzGFuw7M=;
        b=YBg7ciNBvl3xKaIi1UWmtfPa4SLFQnBxxPsBZeNva0/jq0Hkvfn6yjqWKtPiTYSnep
         vv1KO9MIYZ6nkzb2HYKqeMYgKSHD2mRBUeTO+OCW6B4Q7YFiZQxr7CLNYGUjtqUKP3k7
         /kEfEFWIDtf57UutXjhGI9g42UhIZkm8924WAFg9W1U/N3hyOogsJz8eHOEAr0MuJXBO
         ZJ/3yRaB+H8zbHzlNeRerHrRi8qyPbIhoJSvrg508QYqgbB39gseQsRw1nj6Nnbu9vzl
         XftnyZ9hhUmlBLpLplzkCTQ8Y6ftTVASt0YlDTuwQJl2jxadl1OSZDdDziJQtQoKW8L5
         u1kA==
X-Gm-Message-State: AKwxytf/2FN3NXxakE848qNTTDdNHd5a/zTanKbmdATUQiXHep6CHwfY
	CA/JwjUSV3jzuTtXPrCg8hyIVg==
X-Google-Smtp-Source: ACJfBou+QzEHg3vFgeOxzDS+K6rItRqCWDc5jx8AYGAUQp3WgnVhY4Pei/np+jkIYeYc3RWi1goFJQ==
X-Received: by 10.176.32.14 with SMTP id v14mr4623819uak.18.1515344867280;
        Sun, 07 Jan 2018 09:07:47 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.176.71.30 with SMTP id h30ls2379930uac.7.gmail; Sun, 07 Jan
 2018 09:07:45 -0800 (PST)
X-Received: by 10.31.10.199 with SMTP id 190mr969324vkk.3.1515344865691;
        Sun, 07 Jan 2018 09:07:45 -0800 (PST)
In-Reply-To: <fd278536-7104-4aa8-a0fd-bb9788e7c0aa@isocpp.org>
X-Original-Sender: Masse.Nicolas@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:36533
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36533>

------=_Part_11728_855844777.1515344865180
Content-Type: multipart/alternative; 
	boundary="----=_Part_11729_305440276.1515344865181"

------=_Part_11729_305440276.1515344865181
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi all,

Le dimanche 10 d=C3=A9cembre 2017 23:07:54 UTC+1, Nicol Bolas a =C3=A9crit =
:
>
>
> Basically, naked pointers are treated like a hypothetical `optional<T&>`.=
=20
> If you want an owning pointer, you use a smart pointer or, if you cannot=
=20
> properly encapsulate the ownership, `gsl::owner<T>`. If you want a=20
> non-owning array, you use `gsl::span<T>`.
>
> People are going to use `T*` for non-owning pointers; there's no getting=
=20
> around that. We already have one way to spell that; we don't need a secon=
d=20
> one.
>

I should say I just don't agree with you.
When people use naked pointer, we can't know wether it is:
- for storing a non-owned pointer
- due to compatibility with C code
- poorly written code
- whathever

Also it goes against a rule I've set with myself who said that naked=20
pointer should always be avoided :D.

On the other side, when using std::observer_ptr<T>, you know:
- that the given pointer isn't owned and that you should not try to take=20
any ownership on it.
- the code is not that poorly written :)

So I see a real interest in this and hope it will be integrated into the=20
standard.
(In fact I've already written my own class for this, but I would be happy=
=20
if one day I can replace it with something provided by the stl).

Just my 2 cents,
Nicolas.


--=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/c82b2d47-e144-4809-b87a-f70d00d8a7e7%40isocpp.or=
g.

------=_Part_11729_305440276.1515344865181
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi all,<br><br>Le dimanche 10 d=C3=A9cembre 2017 23:07:54 =
UTC+1, Nicol Bolas a =C3=A9crit=C2=A0:<blockquote class=3D"gmail_quote" sty=
le=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left=
: 1ex;"><div dir=3D"ltr"><br><div>Basically, naked pointers are treated lik=
e a hypothetical `optional&lt;T&amp;&gt;`. If you want an owning pointer, y=
ou use a smart pointer or, if you cannot properly encapsulate the ownership=
, `gsl::owner&lt;T&gt;`. If you want a non-owning array, you use `gsl::span=
&lt;T&gt;`.</div><div><br></div><div>People are going to use `T*` for non-o=
wning pointers; there&#39;s no getting around that. We already have one way=
 to spell that; we don&#39;t need a second one.<br></div></div></blockquote=
><div><br></div><div>I should say I just don&#39;t agree with you.</div><di=
v>When people use naked pointer, we can&#39;t know wether it is:</div><div>=
- for storing a non-owned pointer</div><div>- due to compatibility with C c=
ode</div><div>- poorly written code<br></div><div>- whathever</div><div><br=
></div><div>Also it goes against a rule I&#39;ve set with myself who said t=
hat naked pointer should always be avoided :D.</div><div><br></div><div>On =
the other side, when using std::observer_ptr&lt;T&gt;, you know:</div><div>=
- that the given pointer isn&#39;t owned and that you should not try to tak=
e any ownership on it.</div><div>- the code is not that poorly written :)</=
div><br><div> So I see a real interest in this and hope it will be integrat=
ed into the standard.<br></div><div>(In fact I&#39;ve already written my ow=
n class for this, but I would be happy if one day I can replace it with som=
ething provided by the stl).</div><div><br></div><div>Just my 2 cents,<br><=
/div><div></div><div>Nicolas.<br></div><div><br></div><div><br></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/c82b2d47-e144-4809-b87a-f70d00d8a7e7%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c82b2d47-e144-4809-b87a-f70d00d8a7e7=
%40isocpp.org</a>.<br />

------=_Part_11729_305440276.1515344865181--

------=_Part_11728_855844777.1515344865180--

.
