220 31933 <5d35116c-5974-417a-840f-3dc714eae601@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Sun, 2 Apr 2017 15:45:49 -0700 (PDT)
Lines: 165
Approved: news@gmane.org
Message-ID: <5d35116c-5974-417a-840f-3dc714eae601@isocpp.org>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
 <CAOfiQqnfaqA4YhpNphKg4oPPAMNOe7vPjqxqLvA-EnGjk-pVEA@mail.gmail.com>
 <1491170458.9U0G8TLsOk@tjmaciei-mobl1> <CAOfiQqmkjfEqEQpbxWnaLfibTpRTKJdF2UN8M60pL38Qg5s43g@mail.gmail.com>
 <10c2c556-b6bb-4714-83bc-7b0ac8fd4143@isocpp.org>
 <CAOfiQq=rWc3pUeEf3Jo-H-oGJQnyVvRwmqaOPYC7v2WJDMeHDg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_3712_144089446.1491173149922"
X-Trace: blaine.gmane.org 1491173155 15206 195.159.176.226 (2 Apr 2017 22:45:55 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 2 Apr 2017 22:45:55 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBHX6QXDQKGQEU2WDDOA@isocpp.org Mon Apr 03 00:45:51 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBHX6QXDQKGQEU2WDDOA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f72.google.com ([209.85.218.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBHX6QXDQKGQEU2WDDOA@isocpp.org>)
	id 1cuoFl-0002tU-TM
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Apr 2017 00:45:46 +0200
Original-Received: by mail-oi0-f72.google.com with SMTP id v16sf54686028oia.19
        for <gclcip-std-proposals@m.gmane.org>; Sun, 02 Apr 2017 15:45:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to: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=C6pDpq12Za5VnqqVrF/P8+NNE0d7bsSguyoa3HMawfg=;
        b=fOHjUvt0Nms1TU9JGC44y4jj9mTXsgfG4I/PO/OmxoKIqGBc9tW5hHOnjy/3pX4Lin
         rE3Tq2Vqy6zWQj3o25Xqy1sJv1vZWFC18LgmxmCv2+0CC7EkcrGL9/PDh03wkKdFs80i
         tqpbzdBctP5OvxeGOTpQ652XlqypHlKu7zUqZviNz2l02Xbe4jhXwtZVybx9yOfRqA6w
         OqXONaIyaumX3EcIAKkR8u9Ug+bktnmFy86R6202d7daEX4GZ4ZZInQ3WpLF4j+BcKGz
         6MztVxxt49Hvh+7q+6B5xfYnnnhHuSQE0DroZpdpTR8MJV8mTR/c6P+1u+U8xmNWoXfm
         /Sww==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to: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=C6pDpq12Za5VnqqVrF/P8+NNE0d7bsSguyoa3HMawfg=;
        b=D1WzMmaML/uXaSrZ86g/AmB3hoILVCMxV3c/Z9Uqaq8yGtqq4D+QA+DzDlJIOfs30D
         W3A9PTQvz/cjExYs2UoTyMkvOTL2jqaiUn+d7SAa81qbMEP9U5AdekTWY3Quh5tfKNkw
         M9nN4HjrLZismxXjMRjUL0OUMl9n/WeSeswAVYSxi1+TY9Wn7PuNco1xjHCko4SXYHTb
         qcUZUgbyhhjwOeunGG7vNG4Tx4VcyRK8q9M5pirZq2uExsgF4uO8vHeC1bFXN+wWsCv5
         LbqdWRbswaecs/6RY/1VvuGvROB2mJpnkB6gex0KBrG6b3GPiD7RnISONh0wm3PKg4pZ
         jTQw==
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: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=C6pDpq12Za5VnqqVrF/P8+NNE0d7bsSguyoa3HMawfg=;
        b=iQtjgq5N+QAvkKeSwGZPx9v5sAWBT8pDTUhOUhkNX4IyUasbWqGsMCsQQAjlVkoOrz
         8QRsPetAMp8Y0VvjDtTz73eRpT1rsCxAGLysqp37YRDUhkvX52mBDwiHuY5sRBJ4I76o
         nnO6I4WnpZJPmSLA80BdtbedmaqxRfeKjQs3JLiprFWnU9f/HyemtYi/CUKp81CkP0yN
         45m8hcy7a7vlsDv2jcEDTC6sePch2hzV0SC4PLlNj3oDfKwPFzwftXbQEsUEVXkl3Zed
         OA8cIXkWzIdbPMeC0Rl5/Po5JLLXZYnMs7IzGB55jIEJwXXv2Kv1B+zwe0CQuFWmuwuq
         uS6A==
X-Gm-Message-State: AFeK/H2TDd3SY4XQ2FcDUocKDSjzUolcCJBgl2KDPdcW9KRdjLwCZotiIh2APjuLEd9d/w==
X-Received: by 10.157.32.136 with SMTP id x8mr6641073ota.138.1491173151462;
        Sun, 02 Apr 2017 15:45:51 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.47.171 with SMTP id r40ls6498951otb.0.gmail; Sun, 02 Apr
 2017 15:45:50 -0700 (PDT)
X-Received: by 10.157.84.22 with SMTP id j22mr643593oth.13.1491173150560;
        Sun, 02 Apr 2017 15:45:50 -0700 (PDT)
In-Reply-To: <CAOfiQq=rWc3pUeEf3Jo-H-oGJQnyVvRwmqaOPYC7v2WJDMeHDg@mail.gmail.com>
X-Original-Sender: jmckesson@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:31933
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31933>

------=_Part_3712_144089446.1491173149922
Content-Type: multipart/alternative; 
	boundary="----=_Part_3713_2138178914.1491173149922"

------=_Part_3713_2138178914.1491173149922
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Sunday, April 2, 2017 at 4:13:36 PM UTC-4, Richard Smith wrote:
>
> On 2 April 2017 at 12:45, Nicol Bolas <jmck...@gmail.com <javascript:>>=
=20
> wrote:
>
>> On Sunday, April 2, 2017 at 3:28:54 PM UTC-4, Richard Smith wrote:
>>>
>>> On 2 April 2017 at 11:03, Thiago Macieira <thi...@macieira.org> wrote:
>>>
>>>> On s=C3=A1bado, 1 de abril de 2017 21:19:37 PDT Richard Smith wrote:
>>>> > Have you considered that possibility? It would give a better name (_=
=20
>>>> rather
>>>> > than __) and avoid "breaking" existing code that uses __.
>>>>
>>>> _ is not reserved to the compiler and is VERY often #defined to gettex=
t.
>>>>
>>>
>>> Only as a function-like macro.
>>>
>>> Let's use __.
>>>
>>>
>>> Let's use the thing that works best for C++, sure. I am not (yet)=20
>>> convinced that's __.
>>>
>>
>> Well, let's look at the options.
>>
>> You can't use nothing; that would create parsing ambiguities. So you hav=
e=20
>> to put something there: either an identifier or something that is not an=
=20
>> identifier.
>>
>> If it is not an identifier, then it must be a keyword (new or old) or=20
>> some form of punctuation. Adding a new keyword for something like this i=
s=20
>> rather silly. And I don't know of an old keyword that would make for a g=
ood=20
>> placeholder.
>>
>> You could use `[]` as I once suggested, piggybacking off of structured=
=20
>> binding rules. But most other punctuation would be confusing or otherwis=
e=20
>> unexpected in a variable declaration.
>>
>> If it is an identifier, then it must be a *reserved* identifier, to=20
>> minimize code breakage when we change its meaning.
>>
>
> As I pointed out, this is an incorrect conclusion. There is no necessity=
=20
> for any code breakage here, and there is no need to pick a reserved=20
> identifier: the core functionality of this proposal does not require that=
=20
> the identifier be unusable within its scope, and if we don't add that=20
> restriction, this is strictly an extension.
>

But that makes it a *different proposal*. This proposal is about having a=
=20
scope-bound object which *cannot be later referenced*, which has a name=20
that is generated by the compiler. That's what the proposal is for: "for=20
all variables whose name is not important and that is no longer needed=20
after declaration".

You are talking about something else.

--=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/5d35116c-5974-417a-840f-3dc714eae601%40isocpp.or=
g.

------=_Part_3713_2138178914.1491173149922
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sunday, April 2, 2017 at 4:13:36 PM UTC-4, Richard Smit=
h 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"><div>=
<div class=3D"gmail_quote">On 2 April 2017 at 12:45, Nicol Bolas <span dir=
=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailt=
o=3D"lUG55sFXCQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascr=
ipt:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return=
 true;">jmck...@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr">On Sunday, April 2, 2017 at 3:28:54 PM UTC-4, Richa=
rd Smith wrote:<span><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><div class=3D"gmail_quote">On 2 April 2017 at 11:03, Thiago Macieir=
a <span dir=3D"ltr">&lt;<a rel=3D"nofollow">thi...@macieira.org</a>&gt;</sp=
an> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><span>On s=C3=A1bado, 1 de abr=
il de 2017 21:19:37 PDT Richard Smith wrote:<br>
&gt; Have you considered that possibility? It would give a better name (_ r=
ather<br>
&gt; than __) and avoid &quot;breaking&quot; existing code that uses __.<br=
>
<br>
</span>_ is not reserved to the compiler and is VERY often #defined to gett=
ext.<br></blockquote><div><br></div><div>Only as a function-like macro.</di=
v><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex">
Let&#39;s use __.</blockquote><div><br></div><div>Let&#39;s use the thing t=
hat works best for C++, sure. I am not (yet) convinced that&#39;s __.</div>=
</div></div></div></blockquote></span><div><br>Well, let&#39;s look at the =
options.<br><br>You can&#39;t use nothing; that would create parsing ambigu=
ities. So you have to put something there: either an identifier or somethin=
g that is not an identifier.<br><br>If it is not an identifier, then it mus=
t be a keyword (new or old) or some form of punctuation. Adding a new keywo=
rd for something like this is rather silly. And I don&#39;t know of an old =
keyword that would make for a good placeholder.<br><br>You could use `[]` a=
s I once suggested, piggybacking off of structured binding rules. But most =
other punctuation would be confusing or otherwise unexpected in a variable =
declaration.<br><br>If it is an identifier, then it must be a <i>reserved</=
i> identifier, to minimize code breakage when we change its meaning.</div><=
/div></blockquote><div><br></div><div>As I pointed out, this is an incorrec=
t conclusion. There is no necessity for any code breakage here, and there i=
s no need to pick a reserved identifier: the core functionality of this pro=
posal does not require that the identifier be unusable within its scope, an=
d if we don&#39;t add that restriction, this is strictly an extension.</div=
></div></div></div></blockquote><div><br>But that makes it a <i>different p=
roposal</i>. This proposal is about having a scope-bound object which <i>ca=
nnot be later referenced</i>, which has a name that is generated by the com=
piler. That&#39;s what the proposal is for: &quot;for all variables whose n=
ame is not important and that is no longer needed after declaration&quot;.<=
br><br>You are talking about something else.</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/5d35116c-5974-417a-840f-3dc714eae601%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/5d35116c-5974-417a-840f-3dc714eae601=
%40isocpp.org</a>.<br />

------=_Part_3713_2138178914.1491173149922--

------=_Part_3712_144089446.1491173149922--

.
