220 31878 <75b1126c-0292-44dc-973a-c903d31b87ec@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: TONGARI J <tongari95@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: This variable should not be named: an identifier
 (not) to remember
Date: Wed, 29 Mar 2017 08:23:27 -0700 (PDT)
Lines: 100
Approved: news@gmane.org
Message-ID: <75b1126c-0292-44dc-973a-c903d31b87ec@isocpp.org>
References: <985b9b2a-c734-45eb-95f4-db4dc0d309a1@isocpp.org>
 <CAFk2RUZ3+yru+cYSEtxJ1TbZuyWp71gpCGoq=WE_8EAE=+h=2g@mail.gmail.com>
 <7EF863A1-1454-4116-9164-676FF19BF923@gmail.com>
 <CAA7YVg1m+ZHyDdVf6UCVL98Ne_FvGt6SMNZd4OUgY3pHFyxNwg@mail.gmail.com>
 <CAF3xnJSBMmyno-AksyJJz5W=K4J=uY-ynYys3+v=mf5EzCp07w@mail.gmail.com>
 <58DA6B66.2010307@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1525_1771935987.1490801007373"
X-Trace: blaine.gmane.org 1490801017 27557 195.159.176.226 (29 Mar 2017 15:23:37 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 29 Mar 2017 15:23:37 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCC3NA775MLBB35C57DAKGQEBU6XKHA@isocpp.org Wed Mar 29 17:23:33 2017
Return-path: <std-proposals+bncBCC3NA775MLBB35C57DAKGQEBU6XKHA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f72.google.com ([209.85.213.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCC3NA775MLBB35C57DAKGQEBU6XKHA@isocpp.org>)
	id 1ctFRT-0005mg-6W
	for gclcip-std-proposals@m.gmane.org; Wed, 29 Mar 2017 17:23:23 +0200
Original-Received: by mail-vk0-f72.google.com with SMTP id z204sf7083773vkd.16
        for <gclcip-std-proposals@m.gmane.org>; Wed, 29 Mar 2017 08:23:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=PEKadXCD5QWMWmrWLft2JHaTmI0a2hGNW89Pm46Xi5U=;
        b=Wb5ln9itP7Xs4PVhuOGoOmBOzPqZUKju0742W28VzJwbUI5x2y/zxnoWVYadPfKUDn
         hC846TEYw0CeuKgSe97ZcXh2dqoMQ7398H14grL0AzF026tbP5qMOH7hY/TmlGpGGyoj
         eXycCyp83Tse9G654G3MGUOVa2sFTOGie0M8Vb2xewqu8Ke7xZJwefKGIipGNpOnmInA
         g+an2QqqUl1mpMKmMvVqQNK0fz8G8OxOK3njPDQ6jrk0wxdflYqUchRERADk4aolvZRF
         +0UmfUk7YRh3eDORdhhf92dOP3b+11xC0o2sQyQ63f3NvFN6ya1LEKcoKcdmT3h2F6K+
         1pNw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=PEKadXCD5QWMWmrWLft2JHaTmI0a2hGNW89Pm46Xi5U=;
        b=BLgCGSLqQ1nPt+5Dg/6RGXY0A+WN3YyiNGIIrYzZK0tOOjZuQ13ELzBOgCMgso0zh3
         wmrgkAV031HXdY/R1tsYDaVPx0g3VCBtz7UzE+qkE03S54xa2LQQ1WRGMOt5kOfTHW7R
         zCwIQlHh41CbTaF9K0DXx/GtsbiakntYpyh8QGXvKenHRWVrw74uEwa1JTDYM+iZuGX0
         DYph1OQwd862gDMAWdHuRHDtoVwhg70jRGZoSbikxA8UFPVJ3yods9UvZI05ckiGro93
         7Dv+j033zIsKvw9rgS2Rj6YycrjWJKm2OIHaAWBgZIByySw4g2HzXwfJ/KmoZgi1Vy9n
         dzjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=PEKadXCD5QWMWmrWLft2JHaTmI0a2hGNW89Pm46Xi5U=;
        b=KmFa/NnHjhiq8s82/dbGjg+YuJkUOOSfuQnZhsiDRt4S32NWhojSTOwTaebhVP4mPY
         U8m2iJe78N8ajSbrl77mD9ozXgDmsp1Z7uwzdV36Ga5Of3BjS/g0/vcGIhOaTEcr0zFw
         yOSAcZoC61OPW8hpZvJ3VeUKGQOnz02+SqAz3V25GKy4Ui93eFisN5pDzgugqxUijnlx
         NjgkAt2PMJxPJ4PBRx4bIM09jd6CNLOItZrf0oXJoHyrWkZfRKot6PzOn/EBrniUnPB1
         QAC7YpbBgiR1nrzYXa8JHuH2VBrfGLuMzKURNmuQNnOXCzqqM1ZSTU81jhv8I6Quoga+
         dTAQ==
X-Gm-Message-State: AFeK/H1UHco0t5IV7vUGpK+VslMQayvzgOetzzDdeveIWu4L9TNV359qYGiwlAgOg84uQw==
X-Received: by 10.159.56.202 with SMTP id w10mr270413uaf.31.1490801008734;
        Wed, 29 Mar 2017 08:23:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.14.57 with SMTP id c54ls13701390otc.48.gmail; Wed, 29 Mar
 2017 08:23:27 -0700 (PDT)
X-Received: by 10.157.18.133 with SMTP id g5mr196860otg.8.1490801007828;
        Wed, 29 Mar 2017 08:23:27 -0700 (PDT)
In-Reply-To: <58DA6B66.2010307@gmail.com>
X-Original-Sender: tongari95@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:31878
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31878>

------=_Part_1525_1771935987.1490801007373
Content-Type: multipart/alternative; 
	boundary="----=_Part_1526_1708625297.1490801007373"

------=_Part_1526_1708625297.1490801007373
Content-Type: text/plain; charset=UTF-8

On Tuesday, March 28, 2017 at 9:55:54 PM UTC+8, Matthew Woehlke wrote:
>
> The decomposition case I think would be best solved by allowing empty and 
> nested declarations. See 
>
> https://groups.google.com/a/isocpp.org/d/msg/std-proposals/gg3_eUhCuqo/HcippDFiBgAJ 
> and following posts in the thread. This would let you write: 
>
>   auto [] = get_lock(); // no name 
>   auto [x, [], y] = get_tuple(); // middle element is unnamed 
>   auto [x, [a, b], y] = get_tuple(); // nested decomposition 
>
> Both solve the simple case, but both also have additional but 
> non-overlapping usefulness. I'm inclined to think that both are useful. 
>

While I like the idea, but compilers probably don't. In the following 
example:
auto [[a, b], c] = get_tuple();

"[["conflicts with the attribute syntax.

-- 
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/75b1126c-0292-44dc-973a-c903d31b87ec%40isocpp.org.

------=_Part_1526_1708625297.1490801007373
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, March 28, 2017 at 9:55:54 PM UTC+8, Matthew Wo=
ehlke wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">The
decomposition case I think would be best solved by allowing empty and
<br>nested declarations. See
<br><a href=3D"https://groups.google.com/a/isocpp.org/d/msg/std-proposals/g=
g3_eUhCuqo/HcippDFiBgAJ" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msg/std-proposals=
/gg3_eUhCuqo/HcippDFiBgAJ&#39;;return true;" onclick=3D"this.href=3D&#39;ht=
tps://groups.google.com/a/isocpp.org/d/msg/std-proposals/gg3_eUhCuqo/HcippD=
FiBgAJ&#39;;return true;">https://groups.google.com/a/<wbr>isocpp.org/d/msg=
/std-<wbr>proposals/gg3_eUhCuqo/<wbr>HcippDFiBgAJ</a>
<br>and following posts in the thread. This would let you write:
<br>
<br>=C2=A0 auto [] =3D get_lock(); // no name
<br>=C2=A0 auto [x, [], y] =3D get_tuple(); // middle element is unnamed
<br>=C2=A0 auto [x, [a, b], y] =3D get_tuple(); // nested decomposition
<br>
<br>Both solve the simple case, but both also have additional but
<br>non-overlapping usefulness. I&#39;m inclined to think that both are use=
ful.
<br></blockquote><div><br></div><div>While I like the idea, but compilers p=
robably don&#39;t. In the following example:</div><div><div class=3D"pretty=
print" style=3D"background-color: rgb(250, 250, 250); border-color: rgb(187=
, 187, 187); border-style: solid; border-width: 1px; word-wrap: break-word;=
"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"=
color: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">[[</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">a</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> b</span><span style=3D"color: #660;" class=3D"styled-by-prettify">],</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> c</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">]</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">get_tuple</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">();</span></div></code></div><br></div><div>&quot;[[&quot=
;conflicts with the attribute syntax.</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/75b1126c-0292-44dc-973a-c903d31b87ec%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/75b1126c-0292-44dc-973a-c903d31b87ec=
%40isocpp.org</a>.<br />

------=_Part_1526_1708625297.1490801007373--

------=_Part_1525_1771935987.1490801007373--

.
