220 31818 <CADbh+eSOtnM76_2-0kKo7U+DCK4Mt1uYaR1HfAzxcxXuvcv+wg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Brittany Friedman <fourthgeek@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 11:34:26 -0500
Lines: 101
Approved: news@gmane.org
Message-ID: <CADbh+eSOtnM76_2-0kKo7U+DCK4Mt1uYaR1HfAzxcxXuvcv+wg@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=001a113d7eb483d313054bcd0857
X-Trace: blaine.gmane.org 1490718884 21715 195.159.176.226 (28 Mar 2017 16:34:44 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 28 Mar 2017 16:34:44 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCHLPXGUXMJBBE5B5LDAKGQE6SC3LBI@isocpp.org Tue Mar 28 18:34:39 2017
Return-path: <std-proposals+bncBCHLPXGUXMJBBE5B5LDAKGQE6SC3LBI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f72.google.com ([209.85.214.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCHLPXGUXMJBBE5B5LDAKGQE6SC3LBI@isocpp.org>)
	id 1csu4d-0003eP-6u
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Mar 2017 18:34:23 +0200
Original-Received: by mail-it0-f72.google.com with SMTP id h186sf18749955ith.10
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Mar 2017 09:34:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version: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=F9NiTeqboEOnzB3pL8/THU5aPcBUTiAQtKUkEvlpC0Y=;
        b=tTQamV22XesmtoAj32YpbvAxTW0ZCSsmXa7+1+KKJ+eICwKcOpbjmRVVQyJX+ZLbyE
         WXyhT9c0MhQvTY18P7Q/y2Q8PDY2dvPE4L/Bu3H/b1MtjpwT7CCS3mGt+eK6zlCmzr4c
         hCEpLnpbW+JzxmNB7zoJLWmS1N30MFXiVHH2pOFv5eAI2yHlPffiUF8vwsqM7nek7Dho
         WvnIWWNlMdzLcIeGPUgBEbnU4YPoaAq0c2edz4DIXz5LeaRVqnSxgTuEKJir1uWVkW/l
         U/qXxSJaUx9fLiGAM6s90eLD+UCIZr9GmwwiOSRQfqvieMB8NtdJl8GfyG+8vJi56yJb
         hVWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version: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=F9NiTeqboEOnzB3pL8/THU5aPcBUTiAQtKUkEvlpC0Y=;
        b=fTCe6MOseFPwwPER4B2gkORRo+7jqwpfPKyKyvDB/46TG0zQFt9A2Tth9o//5XI0MN
         FIdWwiSI1a2J4wXtYglqRT6IZVJTFm+GzfEfP2tGyjq34bkjTMDUq/yEwT5tkSM1FluI
         kh17NUaDPGa7EE8wLjDPJwRnOqurKZYCBAVJ0hFgQZcdIBykAShEiAccjckr+LLH+w2V
         +yECPAV/B9Ma3Pc3Fkdh/jReQHtW0MhRSniiYJxLBeQEbvtqagp/ZbmHz04rQDi9yR2B
         9WtVJz3r8GBr+0/aGb3N5t/BcdFQbLP+QKoNdC7hGcvx5nAVqH9jQlJgxZPxSQ+cxSk5
         0pwg==
X-Gm-Message-State: AFeK/H3TZvmR33ZUZQ0i5w86eYVE11PjX3rMV7ugAkeXMa9rEhvnNHnHHlbZ3GiysL+Lbg==
X-Received: by 10.107.128.71 with SMTP id b68mr9380181iod.76.1490718868970;
        Tue, 28 Mar 2017 09:34:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.47.2 with SMTP id j2ls2603925itj.3.gmail; Tue, 28 Mar 2017
 09:34:27 -0700 (PDT)
X-Received: by 10.55.98.204 with SMTP id w195mr27056826qkb.197.1490718867368;
        Tue, 28 Mar 2017 09:34:27 -0700 (PDT)
Original-Received: from mail-qt0-x234.google.com (mail-qt0-x234.google.com. [2607:f8b0:400d:c0d::234])
        by mx.google.com with ESMTPS id c67si3840327qkf.291.2017.03.28.09.34.27
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 28 Mar 2017 09:34:27 -0700 (PDT)
Received-SPF: pass (google.com: domain of fourthgeek@gmail.com designates 2607:f8b0:400d:c0d::234 as permitted sender) client-ip=2607:f8b0:400d:c0d::234;
Original-Received: by mail-qt0-x234.google.com with SMTP id n21so68857072qta.1
        for <std-proposals@isocpp.org>; Tue, 28 Mar 2017 09:34:27 -0700 (PDT)
X-Received: by 10.237.36.151 with SMTP id t23mr24262594qtc.8.1490718866786;
 Tue, 28 Mar 2017 09:34:26 -0700 (PDT)
Original-Received: by 10.140.101.165 with HTTP; Tue, 28 Mar 2017 09:34:26 -0700 (PDT)
In-Reply-To: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
X-Original-Sender: fourthgeek@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 fourthgeek@gmail.com designates 2607:f8b0:400d:c0d::234 as permitted sender)
 smtp.mailfrom=fourthgeek@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:31818
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31818>

--001a113d7eb483d313054bcd0857
Content-Type: text/plain; charset=UTF-8

On Mon, Mar 27, 2017 at 3:27 PM, 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>
> .
>



Instead of __, I'd propose using ?. For example auto ? = scope_guard{...}.
? isn't allowed in identifiers so it shouldn't conflict with existing
nonconformant code. ? is also shorter :)

-- 
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/CADbh%2BeSOtnM76_2-0kKo7U%2BDCK4Mt1uYaR1HfAzxcxXuvcv%2Bwg%40mail.gmail.com.

--001a113d7eb483d313054bcd0857
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Mon, Mar 27, 2017 at 3:27 PM, Alberto Barbati <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:albertobarbati@gmail.com" target=3D"_blank">albertobarbati@gm=
ail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le=
ft:1ex"><div dir=3D"ltr">Hello,<br><br>this is a draft for a proposal to ad=
d a special meaning to the identifier __ (double underscore) so that it can=
 be used (even repeatedly in the same lexical scope) for all variables whos=
e name is not important and that is no longer needed after declaration. The=
 draft includes a few examples.<br><br>Is there any interest in this?<br><b=
r>Thanks in advance,<br><br>Alberto<span class=3D"gmail-HOEnZb"><font color=
=3D"#888888"><br><br></font></span></div><span class=3D"gmail-HOEnZb"><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></span></blockquote></div></div><div class=3D"gmail_extra"><br></div=
><div class=3D"gmail_extra"><div><br></div><div><br></div><div>Instead of _=
_, I&#39;d propose using ?. For example auto ? =3D scope_guard{...}. ? isn&=
#39;t allowed in identifiers so it shouldn&#39;t conflict with existing non=
conformant code. ? is also shorter :)</div><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/CADbh%2BeSOtnM76_2-0kKo7U%2BDCK4Mt1uY=
aR1HfAzxcxXuvcv%2Bwg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CADbh%2BeSO=
tnM76_2-0kKo7U%2BDCK4Mt1uYaR1HfAzxcxXuvcv%2Bwg%40mail.gmail.com</a>.<br />

--001a113d7eb483d313054bcd0857--

.
