220 24595 <CABuNDZSXRcaZPoYGSbcCLK1x3p70jzxLCeuVO07Mpu=D41M5tw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Dmitry Banschikov <me@ubique.spb.ru>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: throwaway variable
Date: Mon, 22 Feb 2016 21:47:13 +0300
Lines: 57
Approved: news@gmane.org
Message-ID: <CABuNDZSXRcaZPoYGSbcCLK1x3p70jzxLCeuVO07Mpu=D41M5tw@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>
	<CAA7YVg2QppYXRg-zGEnD4+m5yET4fisd0BhXLyGwMaRZgNe6tQ@mail.gmail.com>
	<nafi40$lve$1@ger.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1456166847 9171 80.91.229.3 (22 Feb 2016 18:47:27 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 22 Feb 2016 18:47:27 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDWPB7UGWEIBBM5PVW3AKGQE3VHXIDY@isocpp.org Mon Feb 22 19:47:22 2016
Return-path: <std-proposals+bncBDWPB7UGWEIBBM5PVW3AKGQE3VHXIDY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f199.google.com ([209.85.223.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDWPB7UGWEIBBM5PVW3AKGQE3VHXIDY@isocpp.org>)
	id 1aXvVu-0000tK-0k
	for gclcip-std-proposals@m.gmane.org; Mon, 22 Feb 2016 19:47:18 +0100
Original-Received: by mail-io0-f199.google.com with SMTP id t64sf361593881ioe.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 22 Feb 2016 10:47:17 -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:content-transfer-encoding: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=DpHvhIQYvq0RJh+AevIyJg92zGK1ZKF7KDj9TBmHWyU=;
        b=HuDIj9AiGxCXPRMW/tFFWg12WV0bxz/9Qeg0+/BRBp3nsIjTEOnP3x/olVtvL/lLlI
         r+9shcVtx2Tx5LLbNe8IA3vwdz3kxXPtU4jEtQ/0t6ezJ9sQ9Zqtw1vqYOcw2Gx8NIQH
         +nrG+1Guy+4JZlV6Ies00Rf3A2fyNlbgQb24p9mRWv3AbGiOXvarXLfpO1+9GA4rZIsh
         IlElp31UUlwQb9eglmthleQkB+54MarW9ss222qmB+X4Wl0Rzy3kyUtxZe7i4osE6L33
         5gr/+ac9cpIODn6DtCVU7oJ6itkxLCGyd91C6zUdZOm+Ny8sadpSYr/u8fkfuYH/nfVa
    
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:content-transfer-encoding
         :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=DpHvhIQYvq0RJh+AevIyJg92zGK1ZKF7KDj9TBmHWyU=;
        b=eOqlYhLojiPXsCI5QoLqczhhfNVpQdSUVEMu/umxKQ8TFoF5hRJaqzgKjzsKhxbtuQ
         +UBEEB3QBI5W7zEUWpgIrMejVaW2OF572V1hvTmWwiYRGhDsJXRHx3tTceg9ah+NTfN3
         pLXY+N3+K+EeMG5gaYjWvpGk6WmpVQhRPPMhVigViWQBfcK5o6NFwrUF4/NpFdHA1HRQ
         BeusrbcXZWKPbdbeOIzO8U9yTNu7VWI0yn6mszVZef6/wIgAV5HXVPMtjfat17wV++C6
         n69ohGZxUoeKBvxftnEnhFD6fPiqlySy31IJxQq1Sr5SOqSalw3GGOCUOsXBFZ+23Ynd 
X-Gm-Message-State: AG10YOTq6iGpJ7pIhlzBmtjqiBBs4y1WHbnPeJ3sPU56GEWyoF69nvTlG1vkP2Cfj4tBnA==
X-Received: by 10.182.255.203 with SMTP id as11mr29849203obd.49.1456166836996;
        Mon, 22 Feb 2016 10:47:16 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.22.202 with SMTP id 68ls1441690qgn.3.gmail; Mon, 22 Feb
 2016 10:47:15 -0800 (PST)
X-Received: by 10.129.84.70 with SMTP id i67mr16363980ywb.16.1456166835072;
        Mon, 22 Feb 2016 10:47:15 -0800 (PST)
Original-Received: from mail-yk0-x235.google.com (mail-yk0-x235.google.com. [2607:f8b0:4002:c07::235])
        by mx.google.com with ESMTPS id e124si11896282ywf.300.2016.02.22.10.47.14
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 22 Feb 2016 10:47:14 -0800 (PST)
Received-SPF: neutral (google.com: 2607:f8b0:4002:c07::235 is neither permitted nor denied by best guess record for domain of me@ubique.spb.ru) client-ip=2607:f8b0:4002:c07::235;
Original-Received: by mail-yk0-x235.google.com with SMTP id z13so65416938ykd.0
        for <std-proposals@isocpp.org>; Mon, 22 Feb 2016 10:47:14 -0800 (PST)
X-Received: by 10.37.33.8 with SMTP id h8mr14375550ybh.175.1456166834166; Mon,
 22 Feb 2016 10:47:14 -0800 (PST)
Original-Received: by 10.37.104.5 with HTTP; Mon, 22 Feb 2016 10:47:13 -0800 (PST)
In-Reply-To: <nafi40$lve$1@ger.gmane.org>
X-Original-Sender: me@ubique.spb.ru
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 2607:f8b0:4002:c07::235 is neither permitted nor denied by best
 guess record for domain of me@ubique.spb.ru) smtp.mailfrom=me@ubique.spb.ru;
       dkim=pass header.i=@ubique-spb-ru.20150623.gappssmtp.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:24595
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24595>

On Mon, Feb 22, 2016 at 8:56 PM, Matthew Woehlke
<mwoehlke.floss@gmail.com> wrote:
> On 2016-02-22 12:00, Viacheslav Usov wrote:
>> On Mon, Feb 22, 2016 at 4:35 PM, Matthew Woehlke 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 =
as
>>>>> 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 of 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.
>
> I'm not sure I'd call it "different" or not. The OP (who curiously seems
> to have dropped out of the conversation) originally only mentioned being
> implicitly `[[maybe_unused]]`. Ville immediately brought up
> http://cplusplus.github.io/EWG/ewg-active.html#35, which dealt with
> "nameless" variables, which seems consistent with the OP's intent as
> well as much more useful (though Dmitry brings up the interesting point
> that these should be `[[maybe_unused]]`, now that that seems likely to
> be in C++17). I've generally read the rest of the thread as referring to
> such 'anonymous variables'.

I haven't dropped conversation, just listening for opinions.
My initial desire was to have something like blank identifier in Go or _
variable in Python. Actually, I have got construct that works but looks ugl=
y:
for(auto attempt [[gnu::unused]] : {1,2,3})
{
.. . .
}

Possibly standard [[unused]] attribute specifier will make a sense.

The idea to have a "__" seems to me as orthogonal one(and for sure useful) =
and
having implicit unused attribute may be not appropriate for it.

--=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/CABuNDZSXRcaZPoYGSbcCLK1x3p70jzxLCeuVO07Mpu%3DD4=
1M5tw%40mail.gmail.com.

.
