220 31921 <CAOfiQqnfaqA4YhpNphKg4oPPAMNOe7vPjqxqLvA-EnGjk-pVEA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Richard Smith <richard@metafoo.co.uk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Sat, 1 Apr 2017 21:19:37 -0700
Lines: 108
Approved: news@gmane.org
Message-ID: <CAOfiQqnfaqA4YhpNphKg4oPPAMNOe7vPjqxqLvA-EnGjk-pVEA@mail.gmail.com>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a114423f6ddf90f054c275944
X-Trace: blaine.gmane.org 1491106790 10465 195.159.176.226 (2 Apr 2017 04:19:50 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 2 Apr 2017 04:19:50 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDVNBJG4YAIBBW7XQHDQKGQEQMWDO7Q@isocpp.org Sun Apr 02 06:19:43 2017
Return-path: <std-proposals+bncBDVNBJG4YAIBBW7XQHDQKGQEQMWDO7Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f69.google.com ([209.85.215.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDVNBJG4YAIBBW7XQHDQKGQEQMWDO7Q@isocpp.org>)
	id 1cuWzG-00016p-J6
	for gclcip-std-proposals@m.gmane.org; Sun, 02 Apr 2017 06:19:34 +0200
Original-Received: by mail-lf0-f69.google.com with SMTP id q141sf423741lfe.13
        for <gclcip-std-proposals@m.gmane.org>; Sat, 01 Apr 2017 21:19:40 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
         :date:message-id:subject: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=urW2QZwmcJ/cx8jT/g4d5zAFEqFBriZRbC1JMvk+CZo=;
        b=P6Gyh36zd2kImV+bPICeh/HlacPW1bSXqtgvghFvTd7u+4vRR9IVjumS2p7sBnVCG+
         2ngEaA4zjM3rQE+6ctiIw9n+qY8Cr5DT5QhZnt2seg4Hx2zrBM8jMEnuDB7Q7xBeVW5B
         xSs6RPA8SaOdvgT12OWjyJgzVTKNtIUjxIf8J9lJBXAk1L8UOQ9ywur0D+9+nVa0fFQK
         S9lP5PXtVXiIbrcVsWB4m50dqzShvU7x373Bs5k4049QjM3+Wt1vNc5PUx8vyq7KEeqQ
         J4eZeGqvQqfgW/RAJPFlH25DriR4l2ISMJMgjqWNE4n3U5gt6tgFrgjiu+swx999mymr
         mjzA==
X-Gm-Message-State: AFeK/H1QRGN46jMme2oo61sM45so07dt9YcrtvA7IxrGfjZ/eKseH/8gxv+Qk2QB2H9l9g==
X-Received: by 10.25.169.141 with SMTP id s135mr1447806lfe.30.1491106780514;
        Sat, 01 Apr 2017 21:19:40 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.113.194 with SMTP id d63ls344970wmi.11.gmail; Sat, 01 Apr
 2017 21:19:39 -0700 (PDT)
X-Received: by 10.28.8.147 with SMTP id 141mr4319597wmi.43.1491106779187;
        Sat, 01 Apr 2017 21:19:39 -0700 (PDT)
Original-Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com. [2a00:1450:400c:c09::231])
        by mx.google.com with ESMTPS id h7si9926014wma.43.2017.04.01.21.19.39
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 01 Apr 2017 21:19:39 -0700 (PDT)
Received-SPF: pass (google.com: domain of metafoo@gmail.com designates 2a00:1450:400c:c09::231 as permitted sender) client-ip=2a00:1450:400c:c09::231;
Original-Received: by mail-wm0-x231.google.com with SMTP id t189so25387323wmt.1
        for <std-proposals@isocpp.org>; Sat, 01 Apr 2017 21:19:39 -0700 (PDT)
X-Received: by 10.28.175.129 with SMTP id y123mr4196064wme.67.1491106778705;
 Sat, 01 Apr 2017 21:19:38 -0700 (PDT)
Original-Sender: metafoo@gmail.com
Original-Received: by 10.80.148.82 with HTTP; Sat, 1 Apr 2017 21:19:37 -0700 (PDT)
Original-Received: by 10.80.148.82 with HTTP; Sat, 1 Apr 2017 21:19:37 -0700 (PDT)
In-Reply-To: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
X-Original-Sender: richard@metafoo.co.uk
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of metafoo@gmail.com
 designates 2a00:1450:400c:c09::231 as permitted sender) smtp.mailfrom=metafoo@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:31921
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31921>

--001a114423f6ddf90f054c275944
Content-Type: text/plain; charset=UTF-8

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 __.

On 27 Mar 2017 10:27 am, "Alberto Barbati" <albertobarbati@gmail.com> wrote:

Hello,

this is a draft for a proposal to add a special meaning to the identifier
__ (double underscore) so that it can be used (even repeatedly in the same
lexical scope) for all variables whose name is not important and that is no
longer needed after declaration. The draft includes a few examples.

Is there any interest in this?

Thanks in advance,

Alberto

-- 
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/985b9b2a-c734-45eb-
95f4-db4dc0d309a1%40isocpp.org
<https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/985b9b2a-c734-45eb-95f4-db4dc0d309a1%40isocpp.org?utm_medium=email&utm_source=footer>
..

-- 
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/CAOfiQqnfaqA4YhpNphKg4oPPAMNOe7vPjqxqLvA-EnGjk-pVEA%40mail.gmail.com.

--001a114423f6ddf90f054c275944
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div>I don&#39;t think you need a reserved identifier for=
 this, nor to change the meaning of any existing code (whether or not it us=
es a reserved identifier). It seems to me that your use cases could be addr=
essed by allowing the identifier _ to declare multiple entities within a bl=
ock scope. (If it is multiply declared, any reference to it would be ill-fo=
rmed due to ambiguity; if it&#39;s only declared once, it can still be refe=
renced for backwards compatibility, but such usage could be deprecated.)<br=
><div class=3D"gmail_extra" dir=3D"auto"><br></div><div class=3D"gmail_extr=
a" dir=3D"auto">Have you considered that possibility? It would give a bette=
r name (_ rather than __) and avoid &quot;breaking&quot; existing code that=
 uses __.</div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On=
 27 Mar 2017 10:27 am, &quot;Alberto Barbati&quot; &lt;<a href=3D"mailto:al=
bertobarbati@gmail.com">albertobarbati@gmail.com</a>&gt; wrote:<br type=3D"=
attribution"><blockquote class=3D"quote" style=3D"margin:0 0 0 .8ex;border-=
left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Hello,<br><br>this i=
s a draft for a proposal to add a special meaning to the identifier __ (dou=
ble underscore) so that it can be used (even repeatedly in the same lexical=
 scope) for all variables whose name is not important and that is no longer=
 needed after declaration. The draft includes a few examples.<br><br>Is the=
re any interest in this?<br><br>Thanks in advance,<br><br>Alberto<font colo=
r=3D"#888888"><br><br></font></div><font color=3D"#888888">

<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" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/985b9b2a-c734-45eb-95f4-db4dc0d309a1%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/985b=
9b2a-c734-45eb-<wbr>95f4-db4dc0d309a1%40isocpp.org</a><wbr>.<br>
</font></blockquote></div><br></div></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/CAOfiQqnfaqA4YhpNphKg4oPPAMNOe7vPjqxq=
LvA-EnGjk-pVEA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOfiQqnfaqA4YhpN=
phKg4oPPAMNOe7vPjqxqLvA-EnGjk-pVEA%40mail.gmail.com</a>.<br />

--001a114423f6ddf90f054c275944--

.
