220 31922 <20170402073350.GA3583@noemi> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Magnus Fromreide <magfr@lysator.liu.se>
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 09:33:50 +0200
Lines: 30
Approved: news@gmane.org
Message-ID: <20170402073350.GA3583@noemi>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
 <CAOfiQqnfaqA4YhpNphKg4oPPAMNOe7vPjqxqLvA-EnGjk-pVEA@mail.gmail.com>
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 1491118436 21208 195.159.176.226 (2 Apr 2017 07:33:56 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 2 Apr 2017 07:33:56 +0000 (UTC)
User-Agent: Mutt/1.8.0 (2017-02-23)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDELLREETMBRBYGSQLDQKGQE2WYGQ3Q@isocpp.org Sun Apr 02 09:33:51 2017
Return-path: <std-proposals+bncBDELLREETMBRBYGSQLDQKGQE2WYGQ3Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f70.google.com ([209.85.215.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDELLREETMBRBYGSQLDQKGQE2WYGQ3Q@isocpp.org>)
	id 1cua1E-0004ec-DQ
	for gclcip-std-proposals@m.gmane.org; Sun, 02 Apr 2017 09:33:48 +0200
Original-Received: by mail-lf0-f70.google.com with SMTP id q141sf776305lfe.13
        for <gclcip-std-proposals@m.gmane.org>; Sun, 02 Apr 2017 00:33:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:subject:message-id:mail-followup-to:references
         :mime-version:content-disposition:in-reply-to:user-agent
         :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=+dWKO4qyPE92rUeiBQCuHtb43gg/Z9ugHokVOHLYUh4=;
        b=r8POE1ZGaW6+xBjW+q8jguTpykZpM9m6Dk/EJWnHHZU4UzhyL0TK01vBpdgfU+3m3R
         GR27R7gGlVP/OUT6XRPwK0qumUPpDpal1vJ5iY+48E1rDBmItGckmGCupCg9vlBpBKXE
         a8PZ2QELio1oPgBdwK7Ri7vnj0LPIAH97l+KE898S6nfUJkuy0T+QjCs6oxEVkYW3Vo0
         iNfnhvyBj8bygeS/NlVbZOEm/XwJR5tJeldqj3fhm3n1o+v2H7DZ48ufv4cot/P0bnrU
         xixSaj12rEMrClt7CIaCjEOEAKnPhia3wKhYvSCitqROpF+77lcMoAp9yhqtiHU 
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:subject:message-id:mail-followup-to
         :references:mime-version:content-disposition:in-reply-to:user-agent
         :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=+dWKO4qyPE92rUeiBQCuHtb43gg/Z9ugHokVOHLYUh4=;
        b=B2HIZME7GHVELyDvPwv2MKkcNsADyAFM0ATqyXhnk/Y9KFueJy6SZQq0RGJ/weKrXi
         wPr+GPJtJiDOQjRXrThNLcptQU4HnMzNoH9/QIs3Wg4AoLrWaD3/um3t261aMg0PlkeD
         kqakSZnKlCOZJ/8dCvVxmQTB49rJ58wDdIHNMCqOxpjMblgNRY1rtyK+SMIV5oJvxKwW
         WwlOdvOZo/OKXXtRa9h8h5uInRQZO4GyB7rh3VtbS8dyzr6xRvXUgjQo+KkKBK98zglT
         oH2nUwMqXAoMNHZhgXioC1stfyTiflY0Dxn/BXUF3/9RtDh/fcmFL86eQKU 
X-Gm-Message-State: AFeK/H0VXchsbHfuN3wZ++WIDm/kP1tTmrEWjDfR1+HHE/5Fif4qP6QHQRoNdekoeaNNXw==
X-Received: by 10.25.216.154 with SMTP id r26mr1454871lfi.7.1491118434572;
        Sun, 02 Apr 2017 00:33:54 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.199.147 with SMTP id x141ls1875167lff.46.gmail; Sun, 02 Apr
 2017 00:33:52 -0700 (PDT)
X-Received: by 10.25.152.9 with SMTP id a9mr3003558lfe.155.1491118432573;
        Sun, 02 Apr 2017 00:33:52 -0700 (PDT)
Original-Received: from mail.lysator.liu.se (mail.lysator.liu.se. [2001:6b0:17:f0a0::3])
        by mx.google.com with ESMTPS id j9si5843844lfj.173.2017.04.02.00.33.52
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 02 Apr 2017 00:33:52 -0700 (PDT)
Received-SPF: pass (google.com: domain of magfr@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted sender) client-ip=2001:6b0:17:f0a0::3;
Original-Received: from mail.lysator.liu.se (localhost [127.0.0.1])
	by mail.lysator.liu.se (Postfix) with ESMTP id F301B40021
	for <std-proposals@isocpp.org>; Sun,  2 Apr 2017 09:33:51 +0200 (CEST)
Original-Received: from noemi (h-155-4-132-137.na.cust.bahnhof.se [155.4.132.137])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mail.lysator.liu.se (Postfix) with ESMTPSA id CA1A640006
	for <std-proposals@isocpp.org>; Sun,  2 Apr 2017 09:33:51 +0200 (CEST)
Mail-Followup-To: std-proposals@isocpp.org
Content-Disposition: inline
In-Reply-To: <CAOfiQqnfaqA4YhpNphKg4oPPAMNOe7vPjqxqLvA-EnGjk-pVEA@mail.gmail.com>
X-Virus-Scanned: ClamAV using ClamSMTP
X-Original-Sender: magfr@lysator.liu.se
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of magfr@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted
 sender) smtp.mailfrom=magfr@lysator.liu.se
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:31922
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31922>

On Sat, Apr 01, 2017 at 09:19:37PM -0700, Richard Smith wrote:
> I don't think you need a reserved identifier for this, nor to change the
> meaning of any existing code (whether or not it uses a reserved
> identifier). It seems to me that your use cases could be addressed by
> allowing the identifier _ to declare multiple entities within a block
> scope. (If it is multiply declared, any reference to it would be ill-formed
> due to ambiguity; if it's only declared once, it can still be referenced
> for backwards compatibility, but such usage could be deprecated.)
> 
> Have you considered that possibility? It would give a better name (_ rather
> than __) and avoid "breaking" existing code that uses __.

If there are concerns about the use of __ due to it beeing used in real code
then that is way worse for _.

One common use of _ is as a macro name in gettextized GNU programs. Now, this
use doesn't clash with the proposed use case but I doubt they are the only
ones that have used the name.

Additionally the name _ is reserved for the library so it is not even ours
in the first place.

/MF

-- 
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/20170402073350.GA3583%40noemi.

.
