220 27023 <CAKiZDp0SZ_kyeQtTKOxZ6VjcfayL3t7Tm75qesy7pxG752KxBw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Patrice Roy <patricer@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Better name for std::launder() ?
Date: Thu, 14 Jul 2016 21:55:29 -0400
Lines: 216
Approved: news@gmane.org
Message-ID: <CAKiZDp0SZ_kyeQtTKOxZ6VjcfayL3t7Tm75qesy7pxG752KxBw@mail.gmail.com>
References: <1cd5895f-df27-9cda-73cf-cbc2f1488a2c@f2.dion.ne.jp>
 <CAOfiQq=4m1yiHj2J4fFBdEVwGyS2eMY7-buNRmDdMzyx3QuYag@mail.gmail.com> <c216cbee-fbfd-ca12-4008-a1fb7d3315e2@f2.dion.ne.jp>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a1140fb5ecd1f600537a2e96e
X-Trace: ger.gmane.org 1468547741 2298 80.91.229.3 (15 Jul 2016 01:55:41 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 15 Jul 2016 01:55:41 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDSZXMHWZIKBBE4FUG6AKGQEW2EC32Y@isocpp.org Fri Jul 15 03:55:35 2016
Return-path: <std-proposals+bncBDSZXMHWZIKBBE4FUG6AKGQEW2EC32Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f198.google.com ([209.85.220.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDSZXMHWZIKBBE4FUG6AKGQEW2EC32Y@isocpp.org>)
	id 1bNsLk-0003kV-Nu
	for gclcip-std-proposals@m.gmane.org; Fri, 15 Jul 2016 03:55:33 +0200
Original-Received: by mail-qk0-f198.google.com with SMTP id a123sf197446286qkd.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 14 Jul 2016 18:55:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=R9onpRiLVf263pY//Wf8ujNkzwXNc5tuWrKT6DuJ4js=;
        b=ls6rSyqzhwl/Z0NyYc9/hdeYZcZVjeHVw6GJ+5FeKPkFc7e8i/NHfypkawh/gFj4t2
         aPfoeMw5PW0xGPSrZWmU83zE5/QksJ6eJzrrtDaOxsc1BOz7OA73XZFBwCHECXOQnfNp
         5GxyHKAxH0CsydFarz1feBzNuEwEfn18B9+Mnh8WwhQ+QiHNeYf50yMH1b2Cf0wcvWIS
         ZLheEd7nKGW+Mfl+6Y9MIsl+tA2QnGChrSm9FwzmYGDY2NBqyZgGszg+v2KryxAI9sfO
         kZbCtIKl1/g9MVz8EGgdkzRUyoMiAIp4b9iJoGUxTQHU9LivTRH13wkJT8EuaMOs/+Fp
         8E0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=R9onpRiLVf263pY//Wf8ujNkzwXNc5tuWrKT6DuJ4js=;
        b=ZC0Ie8gvVJF0/dhTJD0UKwrcKUC7dUEL3DaXvCYCx2mJj0zIETpEfWJdWlbP87hTxp
         PkgIUuWC69G+iSqIP/EN73y4JILq5YPW9WQnomyf3B8YNb7unc+CANP281yZkmUBOGR8
         XVPhkjor75HtQ+bk0Y3sVmq/7HSuZMRRJDHH/SAwUJ+9X34Pccu5NTFlJZQTuHnPJ3Jb
         00Kk/J2H5J4GNomh7Lemaqu84Vd+7vnqorIVv1TrWmjMwBGVNRo1OSYJ0foMee7b3NSL
         HGSkGBQSxkrPflJfeIoZvCeuafWTyaEOXY2PJqa34CPacI5FSm3UD705WpKi0LzImcYF
         qmJw==
X-Gm-Message-State: ALyK8tI7CPAm6his10rOLJgJrHxPPCJ1EJUgVmOQ0kIXwP+dPkipAF9+hH1wKc9osEjI/A==
X-Received: by 10.129.39.138 with SMTP id n132mr13753034ywn.42.1468547731780;
        Thu, 14 Jul 2016 18:55:31 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.9.221 with SMTP id 29ls2668310otz.6.gmail; Thu, 14 Jul
 2016 18:55:30 -0700 (PDT)
X-Received: by 10.31.194.13 with SMTP id s13mr7517552vkf.126.1468547730802;
        Thu, 14 Jul 2016 18:55:30 -0700 (PDT)
Original-Received: from mail-vk0-x22a.google.com (mail-vk0-x22a.google.com. [2607:f8b0:400c:c05::22a])
        by mx.google.com with ESMTPS id u64si1542871uau.212.2016.07.14.18.55.30
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 14 Jul 2016 18:55:30 -0700 (PDT)
Received-SPF: pass (google.com: domain of patricer@gmail.com designates 2607:f8b0:400c:c05::22a as permitted sender) client-ip=2607:f8b0:400c:c05::22a;
Original-Received: by mail-vk0-x22a.google.com with SMTP id x130so136770287vkc.0
        for <std-proposals@isocpp.org>; Thu, 14 Jul 2016 18:55:30 -0700 (PDT)
X-Received: by 10.31.151.133 with SMTP id z127mr4844443vkd.138.1468547730315;
 Thu, 14 Jul 2016 18:55:30 -0700 (PDT)
Original-Received: by 10.176.4.53 with HTTP; Thu, 14 Jul 2016 18:55:29 -0700 (PDT)
In-Reply-To: <c216cbee-fbfd-ca12-4008-a1fb7d3315e2@f2.dion.ne.jp>
X-Original-Sender: patricer@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of patricer@gmail.com
 designates 2607:f8b0:400c:c05::22a as permitted sender) smtp.mailfrom=patricer@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=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:27023
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/27023>

--001a1140fb5ecd1f600537a2e96e
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I, for one, like std::launder() as a name. I also hope very much for it to
remain obscure and used by the limited few who know what it's about. The
less this one gets out, the better :)

2016-07-14 21:42 GMT-04:00 Kazutoshi Satoda <k_satoda@f2.dion.ne.jp>:

> On 2016/07/14 3:47 +0900, Richard Smith wrote:
> > On Wed, Jul 13, 2016 at 11:24 AM, Kazutoshi Satoda <
> k_satoda@f2.dion.ne.jp>
> > wrote:
> ...
> >> It could be std::suppose_new_at_reused_storage(), as a strawman. The
> >> example at [ptr.launder] would look like this:
> >>
> >>   struct X { const int n; };
> >>   X *p =3D new X{3};
> >>   const int a =3D p->n;
> >>   new (p) X{5}; // p does not point to new object (3.8)
> >>                 // because X::n is const
> >>   const int b =3D p->n; // undefined behavior
> >>   const int c =3D std::suppose_new_at_reused_storage(p)->n; // OK
> >>
> >>
> >> What do you think? Is it too late?
> >
> > If you file a national body comment on the CD ballot suggesting renamin=
g
> > it, along with a proposed new name and rationale, it's not too late for
> the
> > committee to consider a different name.
> >
> >> Does someone know the history of the naming?
> >
> > The current name was originally suggested as -- essentially -- a
> > placeholder name, albeit a plausible one, and seems to have broadly bee=
n
> > considered good enough to not require changing. LEWG review discussed t=
he
> > name and decided unanimously that they were fine with it as-is. CWG
> review
> > also discussed the name briefly and did not propose changing it.
>
> Hearing its history, with no strong rationales, I still think renaming it
> is appropriate. I'll try to send a national body comment.
>
> Thank you and those who suggested other (some funny) alternatives.
>
> For now, I still think std::suppose_new_at_reused_storage() is the best.
> "suppose" stands for possibility of cases when the original object is
> still there. "new" stands to indicate lifetime issues by the well known
> keyword. "reused storage" stands to indicate the issue is about reusing
> the storage manually. And there is no need to shorten the name.
>
> However, more suggestions are welcome, of course.
>
>
> FYI, I found a related note about the name in a report of Kona meeting
> by Jonathan Wakely, which can be an additional motivation to rename it.
> > ... After the meeting it was pointed out that some industries might hav=
e
> > trouble convincing regulators that =E2=80=98launder=E2=80=99 is an appr=
opriate
> > identifier to have in their code. (A similar objection was raised to th=
e
> > function corrupted_by_exception ...). ...
> http://accu.org/var/uploads/journals/CVu281-78ac.pdf
>
> --
> k_satoda
>
> --
> 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/c216cbee-fbf=
d-ca12-4008-a1fb7d3315e2%40f2.dion.ne.jp
> .
>

--=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/CAKiZDp0SZ_kyeQtTKOxZ6VjcfayL3t7Tm75qesy7pxG752K=
xBw%40mail.gmail.com.

--001a1140fb5ecd1f600537a2e96e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I, for one, like std::launder() as a name. I also hope ver=
y much for it to remain obscure and used by the limited few who know what i=
t&#39;s about. The less this one gets out, the better :)<br></div><div clas=
s=3D"gmail_extra"><br><div class=3D"gmail_quote">2016-07-14 21:42 GMT-04:00=
 Kazutoshi Satoda <span dir=3D"ltr">&lt;<a href=3D"mailto:k_satoda@f2.dion.=
ne.jp" target=3D"_blank">k_satoda@f2.dion.ne.jp</a>&gt;</span>:<br><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><span class=3D"">On 2016/07/14 3:47 +0900, Richard S=
mith wrote:<br>
&gt; On Wed, Jul 13, 2016 at 11:24 AM, Kazutoshi Satoda &lt;<a href=3D"mail=
to:k_satoda@f2.dion.ne.jp">k_satoda@f2.dion.ne.jp</a>&gt;<br>
&gt; wrote:<br>
</span>...<br>
<span class=3D"">&gt;&gt; It could be std::suppose_new_at_reused_storage(),=
 as a strawman. The<br>
&gt;&gt; example at [ptr.launder] would look like this:<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0struct X { const int n; };<br>
&gt;&gt;=C2=A0 =C2=A0X *p =3D new X{3};<br>
&gt;&gt;=C2=A0 =C2=A0const int a =3D p-&gt;n;<br>
&gt;&gt;=C2=A0 =C2=A0new (p) X{5}; // p does not point to new object (3.8)<=
br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0// be=
cause X::n is const<br>
&gt;&gt;=C2=A0 =C2=A0const int b =3D p-&gt;n; // undefined behavior<br>
&gt;&gt;=C2=A0 =C2=A0const int c =3D std::suppose_new_at_reused_storage(p)-=
&gt;n; // OK<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; What do you think? Is it too late?<br>
&gt;<br>
&gt; If you file a national body comment on the CD ballot suggesting renami=
ng<br>
&gt; it, along with a proposed new name and rationale, it&#39;s not too lat=
e for the<br>
&gt; committee to consider a different name.<br>
&gt;<br>
&gt;&gt; Does someone know the history of the naming?<br>
&gt;<br>
&gt; The current name was originally suggested as -- essentially -- a<br>
&gt; placeholder name, albeit a plausible one, and seems to have broadly be=
en<br>
&gt; considered good enough to not require changing. LEWG review discussed =
the<br>
&gt; name and decided unanimously that they were fine with it as-is. CWG re=
view<br>
&gt; also discussed the name briefly and did not propose changing it.<br>
<br>
</span>Hearing its history, with no strong rationales, I still think renami=
ng it<br>
is appropriate. I&#39;ll try to send a national body comment.<br>
<br>
Thank you and those who suggested other (some funny) alternatives.<br>
<br>
For now, I still think std::suppose_new_at_reused_storage() is the best.<br=
>
&quot;suppose&quot; stands for possibility of cases when the original objec=
t is<br>
still there. &quot;new&quot; stands to indicate lifetime issues by the well=
 known<br>
keyword. &quot;reused storage&quot; stands to indicate the issue is about r=
eusing<br>
the storage manually. And there is no need to shorten the name.<br>
<br>
However, more suggestions are welcome, of course.<br>
<br>
<br>
FYI, I found a related note about the name in a report of Kona meeting<br>
by Jonathan Wakely, which can be an additional motivation to rename it.<br>
&gt; ... After the meeting it was pointed out that some industries might ha=
ve<br>
&gt; trouble convincing regulators that =E2=80=98launder=E2=80=99 is an app=
ropriate<br>
&gt; identifier to have in their code. (A similar objection was raised to t=
he<br>
&gt; function corrupted_by_exception ...). ...<br>
<a href=3D"http://accu.org/var/uploads/journals/CVu281-78ac.pdf" rel=3D"nor=
eferrer" target=3D"_blank">http://accu.org/var/uploads/journals/CVu281-78ac=
..pdf</a><br>
<br>
--<br>
k_satoda<br>
<span class=3D""><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%2Bunsubscribe@isocpp.org">std-propo=
sals+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>
</span>To view this discussion on the web visit <a href=3D"https://groups.g=
oogle.com/a/isocpp.org/d/msgid/std-proposals/c216cbee-fbfd-ca12-4008-a1fb7d=
3315e2%40f2.dion.ne.jp" rel=3D"noreferrer" target=3D"_blank">https://groups=
..google.com/a/isocpp.org/d/msgid/std-proposals/c216cbee-fbfd-ca12-4008-a1fb=
7d3315e2%40f2.dion.ne.jp</a>.<br>
</blockquote></div><br></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/CAKiZDp0SZ_kyeQtTKOxZ6VjcfayL3t7Tm75q=
esy7pxG752KxBw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0SZ_kyeQtT=
KOxZ6VjcfayL3t7Tm75qesy7pxG752KxBw%40mail.gmail.com</a>.<br />

--001a1140fb5ecd1f600537a2e96e--

.
