220 31985 <665b5031-843b-4c30-8bb1-ced918c10656@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "T. C." <rs2740@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Mon, 3 Apr 2017 13:28:56 -0700 (PDT)
Lines: 102
Approved: news@gmane.org
Message-ID: <665b5031-843b-4c30-8bb1-ced918c10656@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>
 <1380e942-6c0c-4bae-9042-d3e5064e96d8@isocpp.org>
 <58E2A8A0.3010100@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_961_1759207746.1491251336906"
X-Trace: blaine.gmane.org 1491251338 15294 195.159.176.226 (3 Apr 2017 20:28:58 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 3 Apr 2017 20:28:58 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCQ43G7NQIIRBCPBRLDQKGQES5U7ILQ@isocpp.org Mon Apr 03 22:28:53 2017
Return-path: <std-proposals+bncBCQ43G7NQIIRBCPBRLDQKGQES5U7ILQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb0-f198.google.com ([209.85.213.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCQ43G7NQIIRBCPBRLDQKGQES5U7ILQ@isocpp.org>)
	id 1cv8aq-0003Ui-J0
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Apr 2017 22:28:52 +0200
Original-Received: by mail-yb0-f198.google.com with SMTP id d76sf29393356ybh.18
        for <gclcip-std-proposals@m.gmane.org>; Mon, 03 Apr 2017 13:28:58 -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=3p4VBGAvJ040A+RWEVTvm4T9+U+DkPcGeLRTy8myUqk=;
        b=FkQ9Ah/Jfb+3jsM/JCfqyGskzWxRdI8Xn+GTpRy5rUOE8hNp4kIHCZOe/ehuMM3u07
         bnZP3GRqAqJzFp5WDFHNBd5zWeMNmS5eXv+pJlrTNu16DOSMKneSeGm2CmdK6j+WpUWz
         /JCYkU3Y9wVCgw8LqyHvsbgv2ba4pOXCMT8FQHzaHA05g1GJr7RsSAav0pgfZUsYM72e
         ZCnyBdBXpHgLtxAPrWCFFZmJ4bgrwV3E32AS/uhdkybMsb6LAjkY5kJVAvO38+gk8205
         iVEpyUJ9qjXvq36S8xy+C6WdHnojPZx0/JolMVtOwZOprtwjqnGVGoOXrm2PgIjC3AzN
         QM4A==
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=3p4VBGAvJ040A+RWEVTvm4T9+U+DkPcGeLRTy8myUqk=;
        b=H3A/nGpbWPQJFGaUW6RUkqvLnWpNXRH0EtXI/t+SSS4z2OwyMAm0JS/8ydCk7MGmgC
         ceU0hGZUp+x+X83qkdobvURmCM2A0PTpCYx6NBAL+ru7WxN42/ZdHWpBAHopqxXgqiJU
         Wy3vK32ATRZsvVuPiSZQCBo7xFRvVBJgsxcxOosqC0wiX+89Vb+UctYHZ5H784e7/56a
         tTziZemb14iLS1jdJwnh+0G9jd/Dwm3TAJBQgh+2YNbPK1v6qD7pgI31WFShKHgOOxiT
         sI5vWgneoAqOw2WBQ5O+8hc5zKe2KFsYXFNrzv+N4ULbSbWC83udbYCP6LkTEXeXX8r1
         5mTw==
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=3p4VBGAvJ040A+RWEVTvm4T9+U+DkPcGeLRTy8myUqk=;
        b=l+O9opg994ChHaGmiMCYGQVRt7y0QVk1sPn4C0+iepQYI0WoiS7EZKEE4ek3nazIi2
         vANGZEqr3gOYwhA/t+RD7vZiQcl7EDe+NLhEK6/l4fahiCHMKU0QJdXBt0tx4HguXpsJ
         nV59Xw1plaVR0UizPNrtlenjbZRtySJPfVcnhqGcMShQUQ0DUc2tPxRvWhESwLCEJupV
         NOfxGLGg9y644Ez53PqdX6meViswSdEGc7CuOx8ohIAmxCXOwwYfZ6mlc61YgGDGBeha
         lZWiKWDSEtw2BOS9bZ7VXI1hgUs1shgESd/RqAdc0xnQtmldlafXzIKvP9de4VaDZztF
         MZDg==
X-Gm-Message-State: AFeK/H3mK3cAxmiUeesxHpCxIV8EE/RYUmxNvXzzoHq3YN5LFJC07NV5LDIlMwifMPBMjA==
X-Received: by 10.129.82.133 with SMTP id g127mr7469385ywb.161.1491251338363;
        Mon, 03 Apr 2017 13:28:58 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.20.70 with SMTP id h64ls2127455oth.33.gmail; Mon, 03 Apr
 2017 13:28:57 -0700 (PDT)
X-Received: by 10.157.89.222 with SMTP id u30mr540831otg.7.1491251337479;
        Mon, 03 Apr 2017 13:28:57 -0700 (PDT)
In-Reply-To: <58E2A8A0.3010100@gmail.com>
X-Original-Sender: rs2740@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:31985
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31985>

------=_Part_961_1759207746.1491251336906
Content-Type: multipart/alternative; 
	boundary="----=_Part_962_1813769586.1491251336907"

------=_Part_962_1813769586.1491251336907
Content-Type: text/plain; charset=UTF-8



On Monday, April 3, 2017 at 3:55:16 PM UTC-4, Matthew Woehlke wrote:
>
> On 2017-04-03 15:37, Barry Revzin wrote: 
> > I think the logical extreme of this idea is to not pick any identifier 
> at 
> > all - simply allow hiding declarations in the same scope. So from the 
> > original paper's examples, using __ to declare multiple variables in the 
> > same scope just works not because of some special magic bestowed upon 
> the 
> > identifier "__", but instead because you're actually declaring multiple 
> > variables in the same scope named "__". You'd have no way of accessing 
> the 
> > earlier versions of __, but then you don't want to anyway. I don't know 
> how 
> > to get the compiler to not warn against not using the last incarnation 
> of 
> > __ though. That just may be a "teach the compiler that this is a 
> convention 
> > that people want to use" kind of thing. 
>
> That seems like a recipe for bugs. We have enough problems with -Wshadow 
> as it is, let alone making the situation *worse*... 
>
>
I think the original idea Richard posited is that there is no hiding. 
Instead, if you declare multiple variables with the same name in the same 
scope, you can't access *any* of them. Name lookup will simply find all the 
declarations and declare an ambiguity at that point.

-- 
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/665b5031-843b-4c30-8bb1-ced918c10656%40isocpp.org.

------=_Part_962_1813769586.1491251336907
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Monday, April 3, 2017 at 3:55:16 PM UTC-4, Matt=
hew Woehlke wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 2017-04-0=
3 15:37, Barry Revzin wrote:
<br>&gt; I think the logical extreme of this idea is to not pick any identi=
fier at=20
<br>&gt; all - simply allow hiding declarations in the same scope. So from =
the=20
<br>&gt; original paper&#39;s examples, using __ to declare multiple variab=
les in the=20
<br>&gt; same scope just works not because of some special magic bestowed u=
pon the=20
<br>&gt; identifier &quot;__&quot;, but instead because you&#39;re actually=
 declaring multiple=20
<br>&gt; variables in the same scope named &quot;__&quot;. You&#39;d have n=
o way of accessing the=20
<br>&gt; earlier versions of __, but then you don&#39;t want to anyway. I d=
on&#39;t know how=20
<br>&gt; to get the compiler to not warn against not using the last incarna=
tion of=20
<br>&gt; __ though. That just may be a &quot;teach the compiler that this i=
s a convention=20
<br>&gt; that people want to use&quot; kind of thing.=20
<br>
<br>That seems like a recipe for bugs. We have enough problems with -Wshado=
w
<br>as it is, let alone making the situation *worse*...
<br>
<br></blockquote><div><br></div><div>I think the original idea Richard posi=
ted is that there is no hiding. Instead, if you declare multiple variables =
with the same name in the same scope, you can&#39;t access *any* of them. N=
ame lookup will simply find all the declarations and declare an ambiguity a=
t that point.</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/665b5031-843b-4c30-8bb1-ced918c10656%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/665b5031-843b-4c30-8bb1-ced918c10656=
%40isocpp.org</a>.<br />

------=_Part_962_1813769586.1491251336907--

------=_Part_961_1759207746.1491251336906--

.
