220 26909 <CABsSThp20QA9Pogo06TM_h2mVMgBgk71-VPU76DR-ai_hjb2Gg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Faisal Vali <faisalv@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Better name for std::launder() ?
Date: Wed, 13 Jul 2016 14:41:18 -0500
Lines: 73
Approved: news@gmane.org
Message-ID: <CABsSThp20QA9Pogo06TM_h2mVMgBgk71-VPU76DR-ai_hjb2Gg@mail.gmail.com>
References: <1cd5895f-df27-9cda-73cf-cbc2f1488a2c@f2.dion.ne.jp> <CAOfiQq=4m1yiHj2J4fFBdEVwGyS2eMY7-buNRmDdMzyx3QuYag@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1468438919 23134 80.91.229.3 (13 Jul 2016 19:41:59 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 13 Jul 2016 19:41:59 +0000 (UTC)
To: "<std-proposals@isocpp.org>" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDDKRIXX5YARB7FSTK6AKGQE426WPRA@isocpp.org Wed Jul 13 21:41:54 2016
Return-path: <std-proposals+bncBDDKRIXX5YARB7FSTK6AKGQE426WPRA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f199.google.com ([209.85.223.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDDKRIXX5YARB7FSTK6AKGQE426WPRA@isocpp.org>)
	id 1bNQ2b-0006y0-2f
	for gclcip-std-proposals@m.gmane.org; Wed, 13 Jul 2016 21:41:53 +0200
Original-Received: by mail-io0-f199.google.com with SMTP id u25sf113639171ioi.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 13 Jul 2016 12:41:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:reply-to:in-reply-to:references:from:date:message-id
         :subject:to:x-original-sender:x-original-authentication-results
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=JRxUm+C+bwFTXOByONM1vYjuWgwEBr53bU22OE/aAhw=;
        b=S+lUIyP0BEUpLW1OA1DLiVwZf3wof8cJUzJAsgMBU18D7akhBFyvnovWkBrddFAJbH
         1KzTD5T2+mY1Ww3AcR1mUzr+qK6h9siY2uxDDPIw6U3qqpF0U/nBmPcqnXozNjFLEgEJ
         3Rjb1459oJMaBXK/GP1z1vsZj11imxyF/gFva4SjcBv9YD82HdA1/sDGzlLQdaLWSA/n
         M7lADI5LITJYhLE+ww1LiTwSmPvNa61KGOTTOeuT19q6BwEclefwkKNy0tIVwR4rK6rf
         SpxZ9MfTpn/H814I63g/y5T7y57BbdWI2WI4jjV56Q6Qi3kTsEiIg//6m2OvFHdWkMBo
         ksHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:reply-to:in-reply-to:references
         :from:date:message-id:subject:to:x-original-sender
         :x-original-authentication-results:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=JRxUm+C+bwFTXOByONM1vYjuWgwEBr53bU22OE/aAhw=;
        b=c06A3kL1KfdAPxOJLMDpgFLyCECn6TM/K3xpSDLGoEzsMIEFKItf/yv+n4g+6npAz1
         xjM7qVKRGOxOXmg3Q7nFrfd6sDDYzjJI+f3kcoesmw6EP4nKwgoAz6iy9xYvCD3ip9Ve
         RoDRxB256EQnRnXySMN7M4lXglj+hXz9q8z6itZSZ1TTClLXaeUFu1cIOeIwLVnhaf3P
         PmJTuZqag8gH9K3tF/0G/I5TIBU3b88vNIgPr8tAO3nt1ywn+C3Pj8iCFDQUZteDfHkA
         DThDGTxkyFxNH/APMkDf8/0sh/1I6bnRXQAn8G+yF89wx22EioEM7iWToZvVe0xFSiKC
         /QFw==
X-Gm-Message-State: ALyK8tJo06J/1hMfL+5lrM8QsKNAzq8qQ/+TT/s8Yo8HYZyAh/3SndnWM038bjCiSnfqvQ==
X-Received: by 10.107.131.233 with SMTP id n102mr8270931ioi.16.1468438912050;
        Wed, 13 Jul 2016 12:41:52 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.89.20 with SMTP id p20ls30033itb.13.gmail; Wed, 13 Jul 2016
 12:41:47 -0700 (PDT)
X-Received: by 10.36.192.8 with SMTP id u8mr24178903itf.77.1468438907873;
        Wed, 13 Jul 2016 12:41:47 -0700 (PDT)
Original-Received: from mail-it0-x229.google.com (mail-it0-x229.google.com. [2607:f8b0:4001:c0b::229])
        by mx.google.com with ESMTPS id l3si18842257itg.106.2016.07.13.12.41.47
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 13 Jul 2016 12:41:47 -0700 (PDT)
Received-SPF: pass (google.com: domain of faisalv@gmail.com designates 2607:f8b0:4001:c0b::229 as permitted sender) client-ip=2607:f8b0:4001:c0b::229;
Original-Received: by mail-it0-x229.google.com with SMTP id u186so29979377ita.0
        for <std-proposals@isocpp.org>; Wed, 13 Jul 2016 12:41:47 -0700 (PDT)
X-Received: by 10.36.139.67 with SMTP id g64mr10739343ite.75.1468438907476;
 Wed, 13 Jul 2016 12:41:47 -0700 (PDT)
Original-Received: by 10.50.229.33 with HTTP; Wed, 13 Jul 2016 12:41:18 -0700 (PDT)
In-Reply-To: <CAOfiQq=4m1yiHj2J4fFBdEVwGyS2eMY7-buNRmDdMzyx3QuYag@mail.gmail.com>
X-Original-Sender: faisalv@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of faisalv@gmail.com
 designates 2607:f8b0:4001:c0b::229 as permitted sender) smtp.mailfrom=faisalv@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:26909
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26909>

On Wed, Jul 13, 2016 at 1:47 PM, Richard Smith <richard@metafoo.co.uk> wrote:
> On Wed, Jul 13, 2016 at 11:24 AM, Kazutoshi Satoda <k_satoda@f2.dion.ne.jp>
> wrote:
>>
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0137r0.html
>> (accepted for C++17)
>>
>> The name std::launder() seems cryptic. There is no hint in the word
>> "launder" to show it is about the C++ object model, lifetime, and
>> reusing storage. The situation is likely same even if a programmer
>> preliminarily knows about the issues it solves. Comments like "Here,
>> compilers should suppose new object at reused storage" will be wanted
>> each time it is used.
>>

Not that I feel strongly about this at all, but your point is not
unreasonable - launder could be named such that it is even more
suggestive (or perhaps less ambiguous - launder has many connotations
- although all of them seem appropriate here depending on your lens).

Would you prefer something along the lines of
std::revived/resurrected/renewed_object ?
Or std::phoenix? ;)


>> On the other hand, assuming its rare uses, usually in libraries, a long
>> name won't be so much problem. Thus, I think a longer and descriptive
>> name is more appropriate. As a bonus, it will be more usable as a search
>> key to find relevant articles about it.
>>
>> 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 = new X{3};
>>   const int a = p->n;
>>   new (p) X{5}; // p does not point to new object (3.8)
>>                 // because X::n is const
>>   const int b = p->n; // undefined behavior
>>   const int c = 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 renaming 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 been considered good
> enough to not require changing. LEWG review discussed the 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.
>
> --
> 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/CAOfiQq%3D4m1yiHj2J4fFBdEVwGyS2eMY7-buNRmDdMzyx3QuYag%40mail.gmail.com.

-- 
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/CABsSThp20QA9Pogo06TM_h2mVMgBgk71-VPU76DR-ai_hjb2Gg%40mail.gmail.com.

.
