220 32063 <58EB8E58.9070105@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Mon, 10 Apr 2017 09:53:28 -0400
Lines: 29
Approved: news@gmane.org
Message-ID: <58EB8E58.9070105@gmail.com>
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>
 <665b5031-843b-4c30-8bb1-ced918c10656@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: blaine.gmane.org 1491832416 24355 195.159.176.226 (10 Apr 2017 13:53:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 10 Apr 2017 13:53:36 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.1.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBYE4V3DQKGQE2UQ7LSQ@isocpp.org Mon Apr 10 15:53:31 2017
Return-path: <std-proposals+bncBC37LBFWUIFBBYE4V3DQKGQE2UQ7LSQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f198.google.com ([209.85.192.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBYE4V3DQKGQE2UQ7LSQ@isocpp.org>)
	id 1cxZl5-0006Co-68
	for gclcip-std-proposals@m.gmane.org; Mon, 10 Apr 2017 15:53:31 +0200
Original-Received: by mail-pf0-f198.google.com with SMTP id m89sf10444232pfi.14
        for <gclcip-std-proposals@m.gmane.org>; Mon, 10 Apr 2017 06:53:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:newsgroups:from:message-id:date:user-agent
         :mime-version:in-reply-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=3NFSNc3UjeV2yQDWyAo6UXAZFPjKFN2qykb2RoYiuCg=;
        b=I9Se/k1xJdFuQKikVpR/GwvkDH0lsJ8yxKoN9fWdFvGueQfnw1VQhnNA6UD/dRNYTg
         HnLpSThLKFcSvM6FJDroQQoK7Q0SzDzGKwgRHtbWoFMGmk0Gn7fhdw2MHj0MtlDV3Nq9
         K422e2nMy6w5M+bbRZp9X7defvpoTrC5iQ2fywjpQ7zAIvP/QLKyEMM/PHNNkCpjDDCe
         WLtlJeo0FiN4BUjudsqX9s8LKquczBZeYSjtZyHqck1FXJ5x3LqyNddM2Be8SrbHFUCE
         lLQqFe7KcLdu4SFWOQJW6cnMPK3qBYMwkrFgEJQDBdywjx0Bo5Z87GhiiEtNl1V1Ba6b
         0L/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:newsgroups:from:message-id
         :date:user-agent:mime-version:in-reply-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=3NFSNc3UjeV2yQDWyAo6UXAZFPjKFN2qykb2RoYiuCg=;
        b=krNAFPRv6bpd+Ei51EEwdHah4dE6vLQ7zVy9AaV2segwoklHG9AwHORywSCIve+mZ+
         wH9jclZMpeWPtXP4AB2Cj+V7j2bBTfkT5UHXR8awTOPCSXpDYiS+t5gDNC8vC9P8Z4tv
         rlnvWPplPkOyvJ9zPrYzOdjCvmoDcwybU4LCbS+lkZwaou10nfDloVg1yR7t6EuJxIS0
         l5T6cLYnOJACVu95Uia7XNViKNDzQDgQVSn27pXFAIB5G879tdk3yHI85IVK3hM4ERw9
         BdK4J8G8AcDtl23jmnroWSTMbUyLSjtBzwI0+iaSE8XESn9fQrg0xbgJknGwR6GrWm/1
         uuCA==
X-Gm-Message-State: AFeK/H3kY+a+hDVv53LjoMT/PGdE0yUQ03BOoLZHD5tb/U8mJ69R0vUEn1wlYez/CSvBvA==
X-Received: by 10.99.138.194 with SMTP id y185mr20858619pgd.69.1491832416911;
        Mon, 10 Apr 2017 06:53:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.60.44 with SMTP id q41ls13670324otc.20.gmail; Mon, 10 Apr
 2017 06:53:36 -0700 (PDT)
X-Received: by 10.237.36.5 with SMTP id r5mr8315147qtc.253.1491832416071;
        Mon, 10 Apr 2017 06:53:36 -0700 (PDT)
Original-Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com. [2607:f8b0:400d:c09::244])
        by mx.google.com with ESMTPS id p39si2792791qtb.195.2017.04.10.06.53.36
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 10 Apr 2017 06:53:36 -0700 (PDT)
Received-SPF: pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c09::244 as permitted sender) client-ip=2607:f8b0:400d:c09::244;
Original-Received: by mail-qk0-x244.google.com with SMTP id k139so19576347qke.2
        for <std-proposals@isocpp.org>; Mon, 10 Apr 2017 06:53:36 -0700 (PDT)
X-Received: by 10.13.213.20 with SMTP id x20mr4470826ywd.6.1491832415473;
        Mon, 10 Apr 2017 06:53:35 -0700 (PDT)
Original-Received: from [192.168.1.176] (tripoint.kitware.com. [66.194.253.20])
        by smtp.googlemail.com with ESMTPSA id b135sm1520039ywh.57.2017.04.10.06.53.33
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 10 Apr 2017 06:53:34 -0700 (PDT)
Original-Newsgroups: gmane.comp.lang.c++.isocpp.proposals
In-Reply-To: <665b5031-843b-4c30-8bb1-ced918c10656@isocpp.org>
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c09::244 as permitted
 sender) smtp.mailfrom=mwoehlke.floss@gmail.com;       dmarc=pass (p=NONE
 sp=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-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:32063
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32063>

On 2017-04-03 16:28, T. C. wrote:
> 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.

How's that going to work?

  auto x = ...;
  ... lots of code ...
  foo(..., x, ...);
  ... lots more code ...
  auto x = ...;

The compiler isn't going to parse the entire scope for variable
declarations first in order to "retroactively" forbid the earlier use of
`x`.

Is the intent that `x` can be used until the second declaration? That's
just... bizarre.

-- 
Matthew

-- 
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/58EB8E58.9070105%40gmail.com.

.
