220 23848 <n7lmlt$rdk$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: RFC: Unpacking tuples to value sequences
Date: Tue, 19 Jan 2016 11:02:05 -0500
Lines: 69
Approved: news@gmane.org
Message-ID: <n7lmlt$rdk$1@ger.gmane.org>
References: <n7jlvp$c44$1@ger.gmane.org> <f758483a-568d-4444-957f-41535c39be4e@isocpp.org> <c91a2d40-17da-4edc-b14b-4e166e9ecaeb@isocpp.org> <n7lk97$93t$1@ger.gmane.org> <1e75441d-d6c0-48d5-a122-3dbf504a061f@isocpp.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 1453219343 28495 80.91.229.3 (19 Jan 2016 16:02:23 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 19 Jan 2016 16:02:23 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBBN47G2AKGQELBZ4TTQ@isocpp.org Tue Jan 19 17:02:15 2016
Return-path: <std-proposals+bncBC37LBFWUIFBBBN47G2AKGQELBZ4TTQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f71.google.com ([74.125.82.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBBN47G2AKGQELBZ4TTQ@isocpp.org>)
	id 1aLYjX-0004dD-G1
	for gclcip-std-proposals@m.gmane.org; Tue, 19 Jan 2016 17:02:15 +0100
Original-Received: by mail-wm0-f71.google.com with SMTP id u188sf41475462wmu.3
        for <gclcip-std-proposals@m.gmane.org>; Tue, 19 Jan 2016 08:02:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=to:from:subject:date:lines:message-id:references:mime-version
         :content-type:content-transfer-encoding:user-agent:in-reply-to
         :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=sEWJpdRYUO1sCP/mYIoolhgw3NZshgPr+XjWkBUy0kI=;
        b=GbK50mwjfG6r4/N/OqwvUOQrpJvSqnDFnfJ6/ezV12xyceY/6Y6ibbR4bivFpkUEaB
         pcr9oAo0SJNbXNpCNQubEXuO8n4IBNjNPBYwvwb5aeM7hmbGGDy9Tqfe8sIxmVDueVEn
         sacrk7bCCVVqp0m6/+AxfrF9VhbXK3IQJha93BDg7N1+30t93Auh1dU7pbfm96lB/w4n
         /mcH93lw3XULjiXwog/XB1CY2ulTWrHbKRlTKgRMFkbUEANSzzexwEL76YW+23HikXHu
         YNNkiVJOrv9SNxcQ60DhOUtvn4SwLzUUQthTWVcJukJLctAeftPzk5a 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:content-type:content-transfer-encoding:user-agent
         :in-reply-to: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=sEWJpdRYUO1sCP/mYIoolhgw3NZshgPr+XjWkBUy0kI=;
        b=RlT2H4UORo3y0yOixbJmTmI9cgLm8glRmQnGIcoctUNRZSidk6uPrtYwgg1lErV4il
         XKyZmIO7sQetqgmKQjtyEEOkipSPU6NRh8bzRYQkFXPD1Hg/5882RBzuaSr6vicCqbuX
         hWSsgrUA7U6gtmY90vArGPrAim0SD+25Cp8uu5Q4CweY3INvWudCpCXhv3J6p9FAhA0M
         uvp/S2QTQ3agvL4UnLqsN1kr2wMt9PN2O1mSnkLWTQWVs0jjNohszPQ+0E2h3ns/klZw
         XchcZCjoet+U5h40cVAppH1LIDlIK6vELnC7qJU1C28pP5hcMUj 
X-Gm-Message-State: ALoCoQk/oM1Je7ZB5+IWzoy4wcN+FtolAP02NfNMMGdfLZ4QkDWjAS48GPsKU77iiAE9/TZoWbaK+7SHYcEm/K1EnxXM6IEFGA==
X-Received: by 10.112.54.202 with SMTP id l10mr4060148lbp.14.1453219334813;
        Tue, 19 Jan 2016 08:02:14 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.163.10 with SMTP id m10ls628969lfe.73.gmail; Tue, 19 Jan
 2016 08:02:13 -0800 (PST)
X-Received: by 10.25.22.232 with SMTP id 101mr8937287lfw.44.1453219333213;
        Tue, 19 Jan 2016 08:02:13 -0800 (PST)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id t4si15057715lbr.207.2016.01.19.08.02.13
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Tue, 19 Jan 2016 08:02:13 -0800 (PST)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1aLYjT-0004aL-V8
	for std-proposals@isocpp.org; Tue, 19 Jan 2016 17:02:12 +0100
Original-Received: from tripoint.kitware.com ([66.194.253.20])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Tue, 19 Jan 2016 17:02:11 +0100
Original-Received: from mwoehlke.floss by tripoint.kitware.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Tue, 19 Jan 2016 17:02:11 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 51
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: tripoint.kitware.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
In-Reply-To: <1e75441d-d6c0-48d5-a122-3dbf504a061f@isocpp.org>
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mailfrom=gclcip-std-proposals@m.gmane.org;
       dmarc=fail (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:23848
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/23848>

On 2016-01-19 10:29, Nicol Bolas wrote:
> On Tuesday, January 19, 2016 at 10:21:25 AM UTC-5, Matthew Woehlke wrote:
>> On 2016-01-19 01:41, Jens =C3=85kerblom wrote:=20
>>> Seems similar to my idea regarding structure bindings.=20
>>
>> No, really it isn't. Structured binding and value sequence unpacking are=
=20
>> related, but significantly different. I tried to make that clear in the=
=20
>> beginning of the Rationale.=20
>>
>> What can I say to make this clearer?=20
>=20
> He's talking about something he suggested earlier=20
> <https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/CcOGS=
KEoQa0>,=20
> which he *calls* a form of "structured binding", but it's really somethin=
g=20
> else. It's the ability to convert a tuple into a named parameter pack, vi=
a=20
> a syntax that *looks* somewhat like structured binding.

Yes, I found the thread again, and have some recollection of it :-).

I can understand the argument that it "isn't structured binding, per
se". Unless I am really confused, however, it's still *a* form of
binding, which is (mostly) orthogonal to my proposal, besides that they
both deal with (different aspects of) very similar concepts.

On further consideration, however, I can see where my proposal might
make the one referenced mostly irrelevant. IOW, if this:

auto {x, y, z...} =3D some_tuple;

....translated to:

  auto x =3D get<0>(some_tuple);
  auto y =3D get<1>(some_tuple);
  auto z =3D make_tuple([2:]some_tuple);

....then Jens' proposal becomes much simplified and doesn't need to
involve mucking about with parameter packs. But it would depend on mine
in order to be able to use the "trailing bits" in the same ways that
were proposed in that thread.

(Please ignore various errors and gratuitous use of novel syntax in the
above; it is just for illustrative purposes.)

> You made some posts in that thread a month back, so you should be aware o=
f=20
> it.

My comments seem to have drifted from the "variadic" part and relate to
"what is tuple-like?". (And... I mentioned this idea there, also :-).)

--=20
Matthew

--=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 https://groups.google.com/a/isocpp.org/group/std-propos=
als/.

.
