220 24591 <CAA7YVg2QppYXRg-zGEnD4+m5yET4fisd0BhXLyGwMaRZgNe6tQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Viacheslav Usov <via.usov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: throwaway variable
Date: Mon, 22 Feb 2016 18:00:34 +0100
Lines: 103
Approved: news@gmane.org
Message-ID: <CAA7YVg2QppYXRg-zGEnD4+m5yET4fisd0BhXLyGwMaRZgNe6tQ@mail.gmail.com>
References: <9658e852-6254-4ecf-a6d4-879160d4de7d@isocpp.org>
	<CAKiZDp0Q9VFSd9ONVDH8hJdhcFQ8daU12yLCSXB69UcRBcMj3Q@mail.gmail.com>
	<CAA7YVg1T2WQM5fzckDE5oczmAycJt-cibZ_iYvWp4SzgkGLpQQ@mail.gmail.com>
	<naf9ro$36k$2@ger.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a113e24b47423a7052c5ec59c
X-Trace: ger.gmane.org 1456160438 29265 80.91.229.3 (22 Feb 2016 17:00:38 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 22 Feb 2016 17:00:38 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDU6VRPKW4BBBM75VS3AKGQEI2JBGCY@isocpp.org Mon Feb 22 18:00:38 2016
Return-path: <std-proposals+bncBDU6VRPKW4BBBM75VS3AKGQEI2JBGCY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f197.google.com ([209.85.213.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDU6VRPKW4BBBM75VS3AKGQEI2JBGCY@isocpp.org>)
	id 1aXtqf-0000kf-2Q
	for gclcip-std-proposals@m.gmane.org; Mon, 22 Feb 2016 18:00:37 +0100
Original-Received: by mail-ig0-f197.google.com with SMTP id dp10sf314619100igc.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 22 Feb 2016 09:00:36 -0800 (PST)
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:date:message-id:subject:from:to
         :content-type: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=laZ5JIfIZJXVZ0OBh9aGrfIDt7VVEbjCeEf2a0LzWoE=;
        b=a8jqCYlK5X7ULj5CuCJNSmBJnqPkDYvimTGzMhkGXCpZtEDelsujc9Y281hdvN2mNS
         Mt2LY82Q9P6gcJM13n2+ZoQwkFUNhQeRfoeL/K2rjckdPDNvnNJBGMqvfH0eJ+qu48ES
         /uYJgKZRRkRQkeoa9CTcdyICD9KeVTwVvY2DVh7tAUzNcVp7HSxepcCfOj3TeWgrAcrt
         09zIUXdIz5uEbIDKhazYL7yOX7MCcGK1Jzub2Nk9+71NFKQnPoWSBuZvW9BqxGIzHv8R
         LY8rGOPRn5+bObeJoxfFjUxRb48wyn19VgZAADxEi+jm1E3TiDF342XbeQGUNFx1BQt2
         /eCQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:content-type: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=laZ5JIfIZJXVZ0OBh9aGrfIDt7VVEbjCeEf2a0LzWoE=;
        b=dfI0dJZCK4qr5n/2UIJlodel9XlR87f4QqnQ0QhYg+pu4nLdRQ31OWmFhy8ZNeI95k
         DCydVSIDsBTN1ldtGLpmJwzbFd+X84opEKp1SkfJamL8Hwm6skhfHnjcETpMvoZzjh+K
         G7B3kIgsZGJMB4CqZrBHQMqd1bemxrpajnEusPdzrP4mVvzgLq8LJDTFIf3IP9/OkbnL
         OxQoYeKdAg07SAWQ7ZXcTAttOMdJ/+TQ5jnBSe57vdj5IEP6MtRYjMoghgCgFBnbPlEI
         v8aCcrtidotCBOKhnrVHZbkEN1ivjmZBVL6noBtizJvpUbXxHtDL+M13pBJjhpdWOcmd
         bT0g==
X-Gm-Message-State: AG10YOQkKcby21hhZ9D9sKG4UGtAkA4zhYRjP1ugYf4Ck9vlj1pn0AmDphyMnEVHxdmYKw==
X-Received: by 10.182.254.35 with SMTP id af3mr27092691obd.37.1456160436200;
        Mon, 22 Feb 2016 09:00:36 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.66.132 with SMTP id f4ls878005obt.88.gmail; Mon, 22 Feb
 2016 09:00:35 -0800 (PST)
X-Received: by 10.182.106.13 with SMTP id gq13mr24408325obb.38.1456160435043;
        Mon, 22 Feb 2016 09:00:35 -0800 (PST)
Original-Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com. [2607:f8b0:4003:c06::234])
        by mx.google.com with ESMTPS id s3si304822oex.18.2016.02.22.09.00.35
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 22 Feb 2016 09:00:35 -0800 (PST)
Received-SPF: pass (google.com: domain of via.usov@gmail.com designates 2607:f8b0:4003:c06::234 as permitted sender) client-ip=2607:f8b0:4003:c06::234;
Original-Received: by mail-oi0-x234.google.com with SMTP id j125so59913089oih.0
        for <std-proposals@isocpp.org>; Mon, 22 Feb 2016 09:00:35 -0800 (PST)
X-Received: by 10.202.196.17 with SMTP id u17mr22776469oif.122.1456160434821;
 Mon, 22 Feb 2016 09:00:34 -0800 (PST)
Original-Received: by 10.76.170.70 with HTTP; Mon, 22 Feb 2016 09:00:34 -0800 (PST)
In-Reply-To: <naf9ro$36k$2@ger.gmane.org>
X-Original-Sender: via.usov@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of via.usov@gmail.com designates 2607:f8b0:4003:c06::234 as permitted
 sender) smtp.mailfrom=via.usov@gmail.com;       dkim=pass header.i=@gmail.com;
       dmarc=pass (p=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-Spam-Checked-In-Group: 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:24591
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24591>

--001a113e24b47423a7052c5ec59c
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 22, 2016 at 4:35 PM, Matthew Woehlke <mwoehlke.floss@gmail.com>
wrote:

> On 2016-02-21 08:55, Viacheslav Usov wrote:
> > On Fri, Feb 19, 2016 at 9:06 PM, Patrice Roy wrote:
> >> I often use _ as =C2=ABuninteresting but needed=C2=BB variables such a=
s
> >> lock_guards. Please don't break my code :)
> >
> > I would even say that this case, "uninteresting but needed" is more
> > interesting. It would be nice to have a language construct that creates
> an
> > "anonymous" variable in the current scope. Alternatively, this could be
> > conceptualized as a temporary whose lifetime is extended till the end o=
f
> > the current scope.
>
> Is that not what we're proposing?
>

I am not sure. The discussion definitely started with a very different
idea, and I do not think I saw a clear statement similar to what I wrote
above.

For the record, I dislike the special names that have been proposed. I
believe the lifetime-extended temporary approach is more appropriate, so
this should probably be phrased in a language involving temporaries; say if
<expression> produces a temporary, then &<expression> makes it an anonymous
variable (and an l-value) in the current scope. The use of & is just an
example and not essential.

Cheers,
V.

--=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/CAA7YVg2QppYXRg-zGEnD4%2Bm5yET4fisd0BhXLyGwMaRZg=
Ne6tQ%40mail.gmail.com.

--001a113e24b47423a7052c5ec59c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M=
on, Feb 22, 2016 at 4:35 PM, Matthew Woehlke <span dir=3D"ltr">&lt;<a href=
=3D"mailto:mwoehlke.floss@gmail.com" target=3D"_blank">mwoehlke.floss@gmail=
..com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,=
204);border-left-style:solid;padding-left:1ex">On 2016-02-21 08:55, Viaches=
lav Usov wrote:<br>
&gt; On Fri, Feb 19, 2016 at 9:06 PM, Patrice Roy wrote:<br>
&gt;&gt; I often use _ as =C2=ABuninteresting but needed=C2=BB variables su=
ch as<br>
&gt;&gt; lock_guards. Please don&#39;t break my code :)<br>
&gt;<br>
&gt; I would even say that this case, &quot;uninteresting but needed&quot; =
is more<br>
&gt; interesting. It would be nice to have a language construct that create=
s an<br>
&gt; &quot;anonymous&quot; variable in the current scope. Alternatively, th=
is could be<br>
&gt; conceptualized as a temporary whose lifetime is extended till the end =
of<br>
&gt; the current scope.<br>
<br>
Is that not what we&#39;re proposing?<br></blockquote><div><br></div><div>I=
 am not sure. The discussion definitely started with a very different idea,=
 and I do not think I saw a clear statement similar to what I wrote above.<=
/div><div><br></div><div>For the record, I dislike the special names that h=
ave been proposed. I believe the lifetime-extended temporary approach is mo=
re appropriate, so this should probably be phrased in a language involving =
temporaries; say if &lt;expression&gt; produces a temporary, then &amp;&lt;=
expression&gt; makes it an anonymous variable (and an l-value) in the curre=
nt scope. The use of &amp; is just an example and not essential.</div><div>=
<br></div><div>Cheers,</div><div>V.</div></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/CAA7YVg2QppYXRg-zGEnD4%2Bm5yET4fisd0B=
hXLyGwMaRZgNe6tQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAA7YVg2QppYXRg=
-zGEnD4%2Bm5yET4fisd0BhXLyGwMaRZgNe6tQ%40mail.gmail.com</a>.<br />

--001a113e24b47423a7052c5ec59c--

.
