220 31831 <94be2101-d81a-4ea2-bc78-cddc33cad37e@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: Tue, 28 Mar 2017 10:31:27 -0700 (PDT)
Lines: 151
Approved: news@gmane.org
Message-ID: <94be2101-d81a-4ea2-bc78-cddc33cad37e@isocpp.org>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
 <2752007.h0gmCLmLCc@tjmaciei-mobl1> <CANh-dXm5Bb-w+89ZVMESVqzGEz7yjiQYQp9gVrn8Om1jXuKyfg@mail.gmail.com>
 <6096248.pKJ4QPQkKS@tjmaciei-mobl1>
 <CANh8DEkdFOYRNoKEDUPxdO-wMaG_CHeFbkou_27NiR9ZxvMwwA@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_11498_123145833.1490722287676"
X-Trace: blaine.gmane.org 1490722297 2166 195.159.176.226 (28 Mar 2017 17:31:37 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 28 Mar 2017 17:31:37 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBB4F35LDAKGQEGVOHLYY@isocpp.org Tue Mar 28 19:31:33 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBB4F35LDAKGQEGVOHLYY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qt0-f200.google.com ([209.85.216.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBB4F35LDAKGQEGVOHLYY@isocpp.org>)
	id 1csuxm-0007jJ-TP
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Mar 2017 19:31:23 +0200
Original-Received: by mail-qt0-f200.google.com with SMTP id h56sf59192384qtc.10
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Mar 2017 10:31:29 -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=CvUMjM9aHaNVv8AknD3F+3Jx07BZPiWmq/rOA/3LStE=;
        b=uAGWf0kJFYMO5r8E0Ee2+tyWOA4qJuyTp/Nr68XHEumSCiDWtHep4esFkFc9b8GvJj
         pbLybmbjp6gmW+3gVvFMw4/QAjGdmzi8hIn6I6hlmq/uHOWtejBYTSMBDlKJv7/LIdih
         ecLCDmjgchfnBGRwc1iQFUAHhGY8CvUwVvLYoOQGfa74uVxl8Ul1/barquxz5+lreUk1
         3Bd8DO/pJynkkpJCaM+aL1r9pOlrimWSO4bYa5wzrq7wnzln2DEqzpEtJTwY+CWzutb4
         Zbgj6iNnucRRjZ6Ikiy4BrbOcUof+3D1gc7DmACCq7ck23rycsPnAQVlF8BdJG46xaiP
         Znig==
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=CvUMjM9aHaNVv8AknD3F+3Jx07BZPiWmq/rOA/3LStE=;
        b=ACSUyIwLgLm1xVMobWjcFZZ0/Iro0y6+QRItq5an+6TyxDtlLpzgtDajg3mDMpz6p+
         N6iHaPeAr0gl4a6riG6K1dHI+lM7/8Tqfvi+7lPmyNyiasLf7yS4p4mrUevREOQZxMxn
         25f+uE6K0DkmfFZfr2JXFDWm1rsORxabcQvj6/Gg+9L8xGDtfoiAmjD94Q/EjPYnSKRc
         +xD4wvl7FpZa1nL0H3HKwTeYn+2vppKZgj8H6q6aoU2fLDGRvDK1RwXKbb0/+Q3izPh5
         oF154BxpQh5hF8YkizAHxlDWe301nd4ckaOVyOdjF/nCveC3UgzUGmVqSclbH0yeqGs0
         2wAA==
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=CvUMjM9aHaNVv8AknD3F+3Jx07BZPiWmq/rOA/3LStE=;
        b=o4URZa2Qfev5fRudKlgYEEjHv5dmp/IAZ5Nd6fiq1DxxZg/7AobeJZzytTP94yuxHr
         w8S3yIY1YHfaPq5YXnQL6cZphyRdMjdN7RHvrhcULDxh5617P0CHSBAWsl+E53PN/n8H
         XFVJTc2cdtc6foZ4vlfsKBr78Y6LYOY9E8dXn3VW6km7Oq+HcQ+d7Iz0+0NpVLIUhgfM
         0E8oOcKAbQv9n1Xt/q3HzxOjmtWytbdKk1FhJExdd42i9kP+vY8Xlmh1S9wgIglvrRMl
         JB5rKaW8mbz+Y0ViuEQN8HGWsMfkyBDV4V5nTk0jKvjFIFQ1lKtoOodkPOFMvmrHXr1r
         M6XA==
X-Gm-Message-State: AFeK/H29NZuyrwmDpZXo+/pRYkiyMfq1dS2Ee9GxVs3bP6NKjt3zake2YXnCk3Lpem4iyQ==
X-Received: by 10.200.55.241 with SMTP id e46mr9204249qtc.22.1490722288777;
        Tue, 28 Mar 2017 10:31:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.62.1 with SMTP id a1ls677708otd.37.gmail; Tue, 28 Mar 2017
 10:31:28 -0700 (PDT)
X-Received: by 10.157.11.150 with SMTP id 22mr1025022oth.18.1490722288001;
        Tue, 28 Mar 2017 10:31:28 -0700 (PDT)
In-Reply-To: <CANh8DEkdFOYRNoKEDUPxdO-wMaG_CHeFbkou_27NiR9ZxvMwwA@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:31831
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31831>

------=_Part_11498_123145833.1490722287676
Content-Type: multipart/alternative; 
	boundary="----=_Part_11499_695470842.1490722287676"

------=_Part_11499_695470842.1490722287676
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tuesday, March 28, 2017 at 1:21:46 PM UTC-4, Matt Calabrese wrote:
>
> On Tue, Mar 28, 2017 at 1:39 AM, Thiago Macieira <thi...@macieira.org=20
> <javascript:>> wrote:
>
>> On segunda-feira, 27 de mar=C3=A7o de 2017 15:16:58 PDT 'Jeffrey Yasskin=
' via=20
>> ISO C
>> ++ Standard - Future Proposals wrote:
>> > > Just remember that there are already existing codebases using __ as
>> > > identifier
>> > > or macro names.
>> >
>> > They're not allowed. "_" is ok outside of the global namespace, but=20
>> "__" is
>> > reserved by [lex.name].
>>
>> I know it is.
>>
>> And yet it's in use.
>> https://github.com/v8/v8/blob/master/src/x64/codegen-x64.cc#L33
>
>
> If we are afraid to break people who use explicitly reserved identifiers,=
=20
> then I think we'd be making a huge mistake. I agree that we should always=
=20
> minimize breaking people when it makes sense and I know that people draw=
=20
> the line at different places, but we should at least be able to make use =
of=20
> an identifier that has been reserved since the initial standard.
>

I have to agree with that. This is literally the *whole point* of reserving=
=20
identifiers: so that we can use them later. It's not like adding a keyword,=
=20
where we need to study the impact of making a change so as to minimize=20
breakage.

If someone was using a reserved identifier (outside of a standard library=
=20
implementation), their code is wrong. We told them to stay out of this=20
area, and they didn't. Their code breaking is not our fault, nor is it on=
=20
us to stay out of their way.

Now, one thing that's important in this regard is that we should do a study=
=20
on the impact of this change on standard library implementations. Since we=
=20
would obviously be taking away one of their identifiers.

--=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/94be2101-d81a-4ea2-bc78-cddc33cad37e%40isocpp.or=
g.

------=_Part_11499_695470842.1490722287676
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, March 28, 2017 at 1:21:46 PM UTC-4, Matt Calab=
rese 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"><d=
iv><div class=3D"gmail_quote">On Tue, Mar 28, 2017 at 1:39 AM, Thiago Macie=
ira <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obf=
uscated-mailto=3D"yhP7iXrFBwAJ" rel=3D"nofollow" onmousedown=3D"this.href=
=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascri=
pt:&#39;;return true;">thi...@macieira.org</a>&gt;</span> wrote:<br><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex">On segunda-feira, 27 de mar=C3=A7o de 2017 15:16:58=
 PDT &#39;Jeffrey Yasskin&#39; via ISO C<br>
<span>++ Standard - Future Proposals wrote:<br>
&gt; &gt; Just remember that there are already existing codebases using __ =
as<br>
&gt; &gt; identifier<br>
&gt; &gt; or macro names.<br>
&gt;<br>
&gt; They&#39;re not allowed. &quot;_&quot; is ok outside of the global nam=
espace, but &quot;__&quot; is<br>
&gt; reserved by [<a href=3D"http://lex.name" rel=3D"nofollow" target=3D"_b=
lank" onmousedown=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhttp%3=
A%2F%2Flex.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF_N3GW5zE1_7z8yWi02=
O4mJS2isg&#39;;return true;" onclick=3D"this.href=3D&#39;http://www.google.=
com/url?q\x3dhttp%3A%2F%2Flex.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCN=
F_N3GW5zE1_7z8yWi02O4mJS2isg&#39;;return true;">lex.name</a>].<br>
<br>
</span>I know it is.<br>
<br>
And yet it&#39;s in use.<br>
<a href=3D"https://github.com/v8/v8/blob/master/src/x64/codegen-x64.cc#L33"=
 rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=3D&#39;https:/=
/www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fv8%2Fv8%2Fblob%2Fmaster=
%2Fsrc%2Fx64%2Fcodegen-x64.cc%23L33\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjC=
NESmh4YdwRnNE1XxVxfhxmYsNRYPw&#39;;return true;" onclick=3D"this.href=3D&#3=
9;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fv8%2Fv8%2Fblob=
%2Fmaster%2Fsrc%2Fx64%2Fcodegen-x64.cc%23L33\x26sa\x3dD\x26sntz\x3d1\x26usg=
\x3dAFQjCNESmh4YdwRnNE1XxVxfhxmYsNRYPw&#39;;return true;">https://github.co=
m/v8/v8/blob/<wbr>master/src/x64/codegen-x64.cc#<wbr>L33</a></blockquote><d=
iv><br></div><div>If we are afraid to break people who use explicitly reser=
ved identifiers, then I think we&#39;d be making a huge mistake. I agree th=
at we should always minimize breaking people when it makes sense and I know=
 that people draw the line at different places, but we should at least be a=
ble to make use of an identifier that has been reserved since the initial s=
tandard.</div></div></div></div></blockquote><div><br>I have to agree with =
that. This is literally the <i>whole point</i> of reserving identifiers: so=
 that we can use them later. It&#39;s not like adding a keyword, where we n=
eed to study the impact of making a change so as to minimize breakage.<br><=
br>If someone was using a reserved identifier (outside of a standard librar=
y implementation), their code is wrong. We told them to stay out of this ar=
ea, and they didn&#39;t. Their code breaking is not our fault, nor is it on=
 us to stay out of their way.<br><br>Now, one thing that&#39;s important in=
 this regard is that we should do a study on the impact of this change on s=
tandard library implementations. Since we would obviously be taking away on=
e of their identifiers.<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/94be2101-d81a-4ea2-bc78-cddc33cad37e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/94be2101-d81a-4ea2-bc78-cddc33cad37e=
%40isocpp.org</a>.<br />

------=_Part_11499_695470842.1490722287676--

------=_Part_11498_123145833.1490722287676--

.
