220 31838 <58DAA2A6.70508@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@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 13:51:34 -0400
Lines: 55
Approved: news@gmane.org
Message-ID: <58DAA2A6.70508@gmail.com>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
 <14211602.1P4LjlnQMh@tjmaciei-mobl1>
 <CAGsORuBepjjTQxa0w+9Z_v+irrc6QwxqmUv98dTRarUCVHHY+A@mail.gmail.com>
 <8028901.3vRB6vfJZY@tjmaciei-mobl1> <58DA9D90.6020207@gmail.com>
 <57461565-aaec-44d2-becd-9abd76ebeb76@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1490723512 23356 195.159.176.226 (28 Mar 2017 17:51:52 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 28 Mar 2017 17:51:52 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.1.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBNWF5LDAKGQECHKJP4A@isocpp.org Tue Mar 28 19:51:47 2017
Return-path: <std-proposals+bncBC37LBFWUIFBBNWF5LDAKGQECHKJP4A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f70.google.com ([209.85.214.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBNWF5LDAKGQECHKJP4A@isocpp.org>)
	id 1csvHV-0005NX-Id
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Mar 2017 19:51:45 +0200
Original-Received: by mail-it0-f70.google.com with SMTP id e75sf19646876itd.16
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Mar 2017 10:51:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:newsgroups:from:message-id:date:user-agent
         :mime-version:in-reply-to: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=UjTzUpTUWCbTlrY+RajNm5xuU9sewKvsHdtqc9kgAuM=;
        b=vFarQaHmDGDZ23xV4TICHCSJ1SyH0n9B1YkM9Oe8V53WST1GdilwuImR8xkvgt0Yq4
         BFQvHUYKzg1RBb1D6sXkl0xqgQYpSSI0cfUdoJVav4gdpnFg5+EsPsAchl4nlpE8FjYK
         3UtM5Vd0ZDZng3VdyZohCcPdcEib/Anh9fLvgN0A+GcmmpskmDsEshSuUhsTIIczSAQr
         eVKwJV3/snXsi6lSmYPLIQEs1dbyUUT/FucaJLLhExwoYZeG5zr954YMsyqFcGHiaddB
         sLTdtgmzlKmrrK9Hfw7KPTA64yK1GaOnmDupB8ith5s1KjyLaDwh+eXoIruJKkS 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:newsgroups:from:message-id
         :date:user-agent:mime-version:in-reply-to: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=UjTzUpTUWCbTlrY+RajNm5xuU9sewKvsHdtqc9kgAuM=;
        b=KlbbVOGTyWwO82B7ZxBCfB9zOR9wEk42QfIt9hf3Z5ZETd/qVjEnRjFNNGFYSIvbKB
         aXDCXBJrtbsDJudV6rDqRZyOxJFvuCm0TGn6pQU3gw0Me6KuJlh6tDL5sYSVASGlHoEf
         ahB4QchDMT+Tzu+A6QyPwU1BE2g3rA3ukfuhTuzgEnFqUnqktqzpWzInAoNUTHlwI+qp
         zu/vBXzrgqKEWGldJOdgjD9cv6/axt5qpPWRSg7tCVlanE+bLu0d7VIOkQhJ1GF1+GBY
         ttInidAi7BTaT7ONyeprdEub2HWCaPKjdipbEzxawyX9uBzGFqA1mo9eMyF 
X-Gm-Message-State: AFeK/H09ojO1p1fUFjj9IyWsgZuGx+NYQYPDqUwSi8UGZ6F5ntmu/k1VYgLPhZNCqqBkWw==
X-Received: by 10.36.127.19 with SMTP id r19mr4486766itc.33.1490723511424;
        Tue, 28 Mar 2017 10:51:51 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.34.21 with SMTP id o21ls810145ota.12.gmail; Tue, 28 Mar
 2017 10:51:50 -0700 (PDT)
X-Received: by 10.202.76.148 with SMTP id z142mr6144360oia.114.1490723510489;
        Tue, 28 Mar 2017 10:51:50 -0700 (PDT)
Original-Received: from mail-ot0-x22a.google.com (mail-ot0-x22a.google.com. [2607:f8b0:4003:c0f::22a])
        by mx.google.com with ESMTPS id q18si1139773otq.167.2017.03.28.10.51.50
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 28 Mar 2017 10:51:50 -0700 (PDT)
Received-SPF: pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:4003:c0f::22a as permitted sender) client-ip=2607:f8b0:4003:c0f::22a;
Original-Received: by mail-ot0-x22a.google.com with SMTP id y88so57175207ota.2
        for <std-proposals@isocpp.org>; Tue, 28 Mar 2017 10:51:50 -0700 (PDT)
X-Received: by 10.157.35.165 with SMTP id t34mr13965045otb.38.1490723496530;
        Tue, 28 Mar 2017 10:51:36 -0700 (PDT)
Original-Received: from [192.168.1.176] (tripoint.kitware.com. [66.194.253.20])
        by smtp.googlemail.com with ESMTPSA id 65sm1974101otq.34.2017.03.28.10.51.35
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 28 Mar 2017 10:51:35 -0700 (PDT)
Original-Newsgroups: gmane.comp.lang.c++.isocpp.proposals
In-Reply-To: <57461565-aaec-44d2-becd-9abd76ebeb76@isocpp.org>
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 mwoehlke.floss@gmail.com designates 2607:f8b0:4003:c0f::22a as permitted
 sender) smtp.mailfrom=mwoehlke.floss@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:31838
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31838>

On 2017-03-28 13:39, Nicol Bolas wrote:
> On Tuesday, March 28, 2017 at 1:29:57 PM UTC-4, Matthew Woehlke wrote:
>> On 2017-03-28 13:03, Thiago Macieira wrote:=20
>>> On ter=C3=A7a-feira, 28 de mar=C3=A7o de 2017 09:53:51 PDT Zhihao Yuan =
wrote:=20
>>>>   auto [__, __] =3D get_tuple(...);=20
>>>>
>>>> should be physically equivalent to=20
>>>>
>>>>   get_tuple(...);=20
>>>>
>>>> thus, the result object is dropped on the floor.=20
>>>
>>> This should be equivalent to:=20
>>>
>>>         auto __ =3D get_tuple(...);=20
>>
>> I would argue it should be equivalent to:=20
>>
>>   auto __magic__ =3D get_tuple(...); // note: same as today=20
>>   auto __ =3D get<0>(__magic__);=20
>>   auto __ =3D get<1>(__magic__);=20
>=20
> The question is this: will people actually want side effects of ignored=
=20
> parameters? Or more to the point, why exactly would you want those side=
=20
> effects?

Consistency?

  // Same? Uh... no?
  auto __ =3D expr;
  auto [__] =3D expr;

  // Same? I hope so?
  auto [__] =3D expr;
  auto x =3D expr; auto __ =3D get<0>(x);

  // Same? Better be!
  auto [y] =3D expr;
  auto x =3D expr; auto y =3D get<0>(x);

--=20
Matthew

--=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/58DAA2A6.70508%40gmail.com.

.
