220 12136 <EF413A07-95EB-4ABF-9784-6DEF4CA82E20@gmail.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Unpacking syntax for tuples using auto
Date: Thu, 31 Jul 2014 07:22:28 +0800
Lines: 74
Approved: news@gmane.org
Message-ID: <EF413A07-95EB-4ABF-9784-6DEF4CA82E20@gmail.com>
References: <bbb1b249-fe99-4fa0-9db1-fbf5a810b9e5@isocpp.org> <a00cfdba-edac-46f3-955f-006c9cae7521@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_B6782DA9-EA82-41A4-B351-CEB567ED808F"
X-Trace: ger.gmane.org 1406762567 12615 80.91.229.3 (30 Jul 2014 23:22:47 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 30 Jul 2014 23:22:47 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBO744WPAKGQE367MR7Q@isocpp.org Thu Jul 31 01:22:38 2014
Return-path: <std-proposals+bncBCW25A7E3QCRBO744WPAKGQE367MR7Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f198.google.com ([209.85.213.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBO744WPAKGQE367MR7Q@isocpp.org>)
	id 1XCdCf-0004Rl-IG
	for gclcip-std-proposals@m.gmane.org; Thu, 31 Jul 2014 01:22:37 +0200
Original-Received: by mail-ig0-f198.google.com with SMTP id h18sf9604279igc.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 30 Jul 2014 16:22:36 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:mime-version:subject:date
         :references:to:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=FclPToJxzvWBn8+T+9zrHL9BlEigQYGjthIQ5nL1b8g=;
        b=Ujwepyjo1EhgYIQ57+IIeHEr81OzbFn/MEtH6yoTdJb1simun2Rq7NXDHwkKFQPU8s
         dB5gX5+11HNCDG9m1r57J0CS1LCXy5osI3rsajpgByTlcMGD3vmcolx+qNCCjJ7lQS3k
         wPmw1H677U+NlfbNm0xOyJI+Pl3TFlCX+lYc1ekIzQINOYSgG2pjoQghLwDAqw7GWNEW
         140bGFeMYm/4wJp/qxZw5CXTDJQxb192YjBvXyd8vZcvaIrfvQtd9eEjcsCV8E7s/Huk
         ARXfZyrU5qm/Tlxcx8V6ceWKd7L7cjFD6bMJNO1N6/858MwTbx9E2KKL2rIwqhM+f7c/
         3qRg==
X-Gm-Message-State: ALoCoQmb1eYjeBZ0fvHYcT2PPsPb2br/DPE5MMbwXn/vbFIVDCBfl6fUbgtPYJelevGoLP655aav
X-Received: by 10.182.33.35 with SMTP id o3mr123769obi.8.1406762556493;
        Wed, 30 Jul 2014 16:22:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.164.161 with SMTP id yr1ls1451797igb.36.gmail; Wed, 30 Jul
 2014 16:22:35 -0700 (PDT)
X-Received: by 10.51.17.2 with SMTP id ga2mr12951181igd.2.1406762555744;
        Wed, 30 Jul 2014 16:22:35 -0700 (PDT)
Original-Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [2607:f8b0:4001:c05::232])
        by mx.google.com with ESMTPS id g8si9693776ica.90.2014.07.30.16.22.35
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 30 Jul 2014 16:22:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:4001:c05::232 as permitted sender) client-ip=2607:f8b0:4001:c05::232;
Original-Received: by mail-ig0-f178.google.com with SMTP id uq10so3862777igb.5
        for <std-proposals@isocpp.org>; Wed, 30 Jul 2014 16:22:35 -0700 (PDT)
X-Received: by 10.50.117.106 with SMTP id kd10mr12537390igb.5.1406762555611;
        Wed, 30 Jul 2014 16:22:35 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.54.34])
        by mx.google.com with ESMTPSA id z4sm14764219igp.14.2014.07.30.16.22.33
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 30 Jul 2014 16:22:35 -0700 (PDT)
In-Reply-To: <a00cfdba-edac-46f3-955f-006c9cae7521@isocpp.org>
X-Mailer: Apple Mail (2.1878.6)
X-Original-Sender: potswa@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of potswa@gmail.com designates 2607:f8b0:4001:c05::232 as permitted
 sender) smtp.mail=potswa@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-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:12136
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/12136>

--Apple-Mail=_B6782DA9-EA82-41A4-B351-CEB567ED808F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1


On 2014-07-30, at 10:29 PM, walter1234 <walter2bz@gmail.com> wrote:

> Would `struct` in an lvalue location work , directly analogous to the des=
tructuring in rust, just with sequential access allowed to named structs (s=
o they can be used like tuples in functional languages)
>=20
> eg=20
>=20
>    struct  { auto x,auto y,auto z } =3D std::make_tuple(1,2.0,"three");  =
//x=3D1, y=3D2.0, z=3D"three"

Note, this is similar to a C11 anonymous structure in syntax and semantics.=
 The unpacked x, y, and z wouldn't need to be a new kind of entity. The "da=
mage" would be contained to initialization semantics, and there might be sy=
nergy with deduced class template arguments as well.

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--Apple-Mail=_B6782DA9-EA82-41A4-B351-CEB567ED808F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-=
mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 2014&=
ndash;07&ndash;30, at 10:29 PM, walter1234 &lt;<a href=3D"mailto:walter2bz@=
gmail.com">walter2bz@gmail.com</a>&gt; wrote:</div><br class=3D"Apple-inter=
change-newline"><blockquote type=3D"cite"><div dir=3D"ltr"><font face=3D"ar=
ial, sans-serif">Would `struct` in an lvalue location work , directly analo=
gous to the destructuring in rust, just with sequential&nbsp;access allowed=
 to named structs (so they can be used like tuples in functional&nbsp;langu=
ages)</font><div><font face=3D"arial, sans-serif"><br></font></div><div><fo=
nt face=3D"arial, sans-serif">eg&nbsp;</font></div><div><font face=3D"arial=
, sans-serif"><br></font></div><div><font face=3D"arial, sans-serif">&nbsp;=
 &nbsp;struct &nbsp;{ auto x,auto y,auto z } =3D std::make_tuple(1,2.0,"thr=
ee"); &nbsp;//x=3D1, y=3D2.0, z=3D&ldquo;three"</font></div></div></blockqu=
ote><div><br></div><div>Note, this is similar to a C11 anonymous structure =
in syntax and semantics. The unpacked x, y, and z wouldn&rsquo;t need to be=
 a new kind of entity. The &ldquo;damage&rdquo; would be contained to initi=
alization semantics, and there might be synergy with deduced class template=
 arguments as well.</div></div><br></body></html>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_B6782DA9-EA82-41A4-B351-CEB567ED808F--

.
