220 31794 <9C5ACBB5-5FF7-495E-9DF4-6DD5E857ED72@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Alberto Barbati <albertobarbati@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 08:18:41 +0200
Lines: 175
Approved: news@gmane.org
Message-ID: <9C5ACBB5-5FF7-495E-9DF4-6DD5E857ED72@gmail.com>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org> <CACL3gUVC1R9occL7vwiNTb9s4rD-+aemb4AprquTjQvr-xRjwg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0 (1.0)
Content-Type: multipart/alternative;
	boundary=Apple-Mail-5B2EAA3A-10BD-41AB-88C8-C0C45CA4A342
Content-Transfer-Encoding: 7bit
X-Trace: blaine.gmane.org 1490681935 28949 195.159.176.226 (28 Mar 2017 06:18:55 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 28 Mar 2017 06:18:55 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCPY5DV6RIMBBREA5DDAKGQEXUKVBZI@isocpp.org Tue Mar 28 08:18:50 2017
Return-path: <std-proposals+bncBCPY5DV6RIMBBREA5DDAKGQEXUKVBZI@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+bncBCPY5DV6RIMBBREA5DDAKGQEXUKVBZI@isocpp.org>)
	id 1cskSl-0005zM-C2
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Mar 2017 08:18:39 +0200
Original-Received: by mail-lf0-f70.google.com with SMTP id t132sf33556173lfe.12
        for <gclcip-std-proposals@m.gmane.org>; Mon, 27 Mar 2017 23:18:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:content-transfer-encoding:mime-version:date:subject:message-id
         :references:in-reply-to: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=f8xwsSVoigOcMcUmVkbr/erG+f/Xy3XLuGrBBTb/fU0=;
        b=iSfS8YmmGWGJr5z3R28+aEzMvfC3uISLlTo5zbv8D8SfZbfI05lnF7SBnnPPJ633EW
         PluLcQEjrCBKX043XV8dwRa0JFgyJOMX+a2zUzZ24IE+Nrp3y09GEELbhSBX+hH5ZngG
         90FFjeuXUrAOTCc7g4jFC2qAqpwdr1xYUpXUB5RZcSdcb0jkQWae9frHovDHnLjvgsaO
         oYqwEhuxrfylZJytwQoQ/SNPjZaJmqUotrhT/QkQjh/nzTbdA9CiIb/6QJAmu/wgKoN4
         PHu/RyNwUhjKPxEnxZY2TSPccFrH9huwcKn7dU1S8RU1YmYOueOqQg17TyFWoQMkMMzV
         OMFA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:content-transfer-encoding:mime-version:date
         :subject:message-id:references:in-reply-to: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=f8xwsSVoigOcMcUmVkbr/erG+f/Xy3XLuGrBBTb/fU0=;
        b=c5xDJEsnQhQivZGZrQdb9d5+ZFmoW371E09qP/NSC/FRr5ou5lidljNBAQnoBVgol3
         1KSkOwo4Hl+iM7/vg2VrwHEr96a6eGEGA9e5pQvYF/b295r8o7Gd8BnuJz4a0SUmFqPC
         N9+K1zw/CAObK7EqtiMcDSXfXqR2QpvsbAVo8QEemZJAS1zYsn/hxScqxwNWOr0HcdsK
         SUQPC8+ihE4Bsb4S+uSqpQ6ysjKfxkdxIKpnie6R21Fj59bW1+zH9PoJfOCa2cvtHQas
         z81SHhgZTk0ZOJqQaGnleU1mr7BQGHqopDWZYDwJdN0t3t1DkwxCo2OIwYlBh0XpkBpX
         UKD 
X-Gm-Message-State: AFeK/H1ysO/fHKuzISG3Ki+mw89M+RNh0rbreaqBI2I3DfiYI/RoINhQnRZ4CUQ2XoOcNw==
X-Received: by 10.25.72.71 with SMTP id v68mr3588094lfa.9.1490681925565;
        Mon, 27 Mar 2017 23:18:45 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.157.193 with SMTP id g184ls1661005wme.13.gmail; Mon, 27 Mar
 2017 23:18:44 -0700 (PDT)
X-Received: by 10.28.22.129 with SMTP id 123mr12050758wmw.10.1490681924193;
        Mon, 27 Mar 2017 23:18:44 -0700 (PDT)
Original-Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com. [2a00:1450:400c:c0c::241])
        by mx.google.com with ESMTPS id m42si3460524wrm.252.2017.03.27.23.18.44
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 27 Mar 2017 23:18:44 -0700 (PDT)
Received-SPF: pass (google.com: domain of albertobarbati@gmail.com designates 2a00:1450:400c:c0c::241 as permitted sender) client-ip=2a00:1450:400c:c0c::241;
Original-Received: by mail-wr0-x241.google.com with SMTP id p52so16426537wrc.2
        for <std-proposals@isocpp.org>; Mon, 27 Mar 2017 23:18:44 -0700 (PDT)
X-Received: by 10.28.107.129 with SMTP id a1mr7614043wmi.47.1490681923581;
        Mon, 27 Mar 2017 23:18:43 -0700 (PDT)
Original-Received: from [172.20.10.6] ([91.252.4.165])
        by smtp.gmail.com with ESMTPSA id k128sm2165147wmf.16.2017.03.27.23.18.42
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 27 Mar 2017 23:18:43 -0700 (PDT)
In-Reply-To: <CACL3gUVC1R9occL7vwiNTb9s4rD-+aemb4AprquTjQvr-xRjwg@mail.gmail.com>
X-Mailer: iPad Mail (14D27)
X-Original-Sender: AlbertoBarbati@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 albertobarbati@gmail.com designates 2a00:1450:400c:c0c::241 as permitted
 sender) smtp.mailfrom=albertobarbati@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:31794
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31794>


--Apple-Mail-5B2EAA3A-10BD-41AB-88C8-C0C45CA4A342
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Chris,

Even if it cannot be referenced again, a __ variable is still a variable an=
d therefore it ends its lifetime at the end of the lexical scope. Its destr=
uctor is therefore called when the scope is exited either normally or excep=
tionally and no sooner. This is the main point of the RAII idiom. On the ot=
her hand, `Foo{bar};` creates a temporary object that is immediately destro=
yed at the end of the statement.

Cheers,

Alberto

> Il giorno 27 mar 2017, alle ore 22:51, Christopher Di Bella <cjdb.ns@gmai=
l.com> ha scritto:
>=20
> Hi,
>=20
> Thanks for taking the time out to write this! It seems like there is moti=
vation, but I can't quite place my finger on it. If a variable isn't going =
to be used again, and can't be referenced, what are the benefits of its per=
sistence have over `Foo{bar};`?
>=20
> Cheers,
>=20
> Chris
>=20
>=20
>> On Tue., 28 Mar. 2017, 07:27 Alberto Barbati, <albertobarbati@gmail.com>=
 wrote:
>> Hello,
>>=20
>> this is a draft for a proposal to add a special meaning to the identifie=
r __ (double underscore) so that it can be used (even repeatedly in the sam=
e lexical scope) for all variables whose name is not important and that is =
no longer needed after declaration. The draft includes a few examples.
>>=20
>> Is there any interest in this?
>>=20
>> Thanks in advance,
>>=20
>> Alberto
>>=20
>> --=20
>> You received this message because you are subscribed to the Google Group=
s "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n 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/iso=
cpp.org/d/msgid/std-proposals/985b9b2a-c734-45eb-95f4-db4dc0d309a1%40isocpp=
..org.
>=20
> --=20
> You received this message because you are subscribed to a topic in the Go=
ogle Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit https://groups.google.com/a/isocpp.=
org/d/topic/std-proposals/BTVwFqDkhXk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to std-p=
roposals+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/isoc=
pp.org/d/msgid/std-proposals/CACL3gUVC1R9occL7vwiNTb9s4rD-%2Baemb4AprquTjQv=
r-xRjwg%40mail.gmail.com.

--=20
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 e=
mail 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/9C5ACBB5-5FF7-495E-9DF4-6DD5E857ED72%40gmail.com=
..

--Apple-Mail-5B2EAA3A-10BD-41AB-88C8-C0C45CA4A342
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=
=3Dutf-8"></head><body dir=3D"auto"><div></div><div>Hi Chris,</div><div><br=
></div><div>Even if it cannot be referenced again, a __ variable is still a=
 variable and therefore it ends its lifetime at the end of the lexical scop=
e. Its destructor is therefore called when the scope is exited either norma=
lly or exceptionally and no sooner. This is the main point of the RAII idio=
m. On the other hand, `Foo{bar};` creates a temporary object that is immedi=
ately destroyed at the end of the statement.</div><div><br></div><div>Cheer=
s,</div><div><br></div><div>Alberto</div><div><br>Il giorno 27 mar 2017, al=
le ore 22:51, Christopher Di Bella &lt;<a href=3D"mailto:cjdb.ns@gmail.com"=
>cjdb.ns@gmail.com</a>&gt; ha scritto:<br><br></div><blockquote type=3D"cit=
e"><div><p dir=3D"ltr">Hi,</p>
<p dir=3D"ltr">Thanks for taking the time out to write this! It seems like =
there is motivation, but I can't quite place my finger on it. If a variable=
 isn't going to be used again, and can't be referenced, what are the benefi=
ts of its persistence have over `Foo{bar};`?</p>
<p dir=3D"ltr">Cheers,</p>
<p dir=3D"ltr">Chris </p>
<br><div class=3D"gmail_quote"><div dir=3D"ltr">On Tue., 28 Mar. 2017, 07:2=
7 Alberto Barbati, &lt;<a href=3D"mailto:albertobarbati@gmail.com">albertob=
arbati@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><di=
v dir=3D"ltr" class=3D"gmail_msg">Hello,<br class=3D"gmail_msg"><br class=
=3D"gmail_msg">this is a draft for a proposal to add a special meaning to t=
he identifier __ (double underscore) so that it can be used (even repeatedl=
y 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 ex=
amples.<br class=3D"gmail_msg"><br class=3D"gmail_msg">Is there any interes=
t in this?<br class=3D"gmail_msg"><br class=3D"gmail_msg">Thanks in advance=
,<br class=3D"gmail_msg"><br class=3D"gmail_msg">Alberto<br class=3D"gmail_=
msg"><br class=3D"gmail_msg"></div>

<p class=3D"gmail_msg"></p>

-- <br class=3D"gmail_msg">
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br class=3D"gmail_msg">
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" class=3D"gm=
ail_msg" target=3D"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br cla=
ss=3D"gmail_msg">
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" class=3D"gmail_msg" target=3D"_blank">std-proposals@isocpp.org</a>.<b=
r class=3D"gmail_msg">
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" class=3D"gmail_msg=
" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-prop=
osals/985b9b2a-c734-45eb-95f4-db4dc0d309a1%40isocpp.org</a>.<br class=3D"gm=
ail_msg">
</blockquote></div>

<p></p>

-- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups "ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/BTVwFqDkhXk/unsubscribe">https://groups.=
google.com/a/isocpp.org/d/topic/std-proposals/BTVwFqDkhXk/unsubscribe</a>.<=
br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+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/CACL3gUVC1R9occL7vwiNTb9s4rD-%2Baemb4=
AprquTjQvr-xRjwg%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACL3gUVC1R=
9occL7vwiNTb9s4rD-%2Baemb4AprquTjQvr-xRjwg%40mail.gmail.com</a>.<br>
</div></blockquote></body></html>

<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/9C5ACBB5-5FF7-495E-9DF4-6DD5E857ED72%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/9C5ACBB5-5FF7-495E-9DF4-6DD5E857ED72%=
40gmail.com</a>.<br />

--Apple-Mail-5B2EAA3A-10BD-41AB-88C8-C0C45CA4A342--

.
