220 24184 <CADvuK0L-=ggA-8i9sFfN-t6VObFWBEVh3Kda5ukeLwHigsW-=w@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: "Arthur O'Dwyer" <arthur.j.odwyer@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: RFC: Unpacking tuples to value sequences
Date: Wed, 3 Feb 2016 16:28:17 -0800
Lines: 171
Approved: news@gmane.org
Message-ID: <CADvuK0L-=ggA-8i9sFfN-t6VObFWBEVh3Kda5ukeLwHigsW-=w@mail.gmail.com>
References: <n7jlvp$c44$1@ger.gmane.org>
	<n7lqmm$2d3$1@ger.gmane.org>
	<6ad65a24-8a2e-4053-b9c9-80d296d98e7d@isocpp.org>
	<n7m5v9$346$1@ger.gmane.org>
	<72de7daf-93af-4e55-95ea-67898bd2a5f6@isocpp.org>
	<n7o939$vj0$1@ger.gmane.org>
	<CADvuK0+ecVzhSbXo-1Yr-Awp2OGgR53vqe+6oCigA1wS+nVk1w@mail.gmail.com>
	<n7qu59$1sg$1@ger.gmane.org>
	<29e7b2a0-05fb-46e2-92bc-2a83f8a1e53c@isocpp.org>
	<n85baf$hvg$1@ger.gmane.org>
	<CAFk2RUaAbAJPgNZcCBHKEeKO16WTNK2dzHby=8aD1Sra-HpnUA@mail.gmail.com>
	<n85f6j$lh1$1@ger.gmane.org>
	<CAFk2RUbp=SEBZa_T+KUDqOiEt0T-jid4MxkuLJQK=_=_g3pPng@mail.gmail.com>
	<n85lg5$3jl$1@ger.gmane.org>
	<CADvuK0K1frMJcBik1+wV0HXMQX-+YcfF_X8aV9cm20dgNyFcQg@mail.gmail.com>
	<n85upk$71n$1@ger.gmane.org>
	<cd2383c2-e81f-411f-ac71-203ae4398759@isocpp.org>
	<CADvuK0JzXRaw1-m5k0_Lh8O0H9tUoZa3fWVxYuatRABjB_sChA@mail.gmail.com>
	<93bbc0ca-e986-45a3-b86e-9aa4f38feb2e@isocpp.org>
	<CADvuK0JeTOPYOp5L79WALmru4gTdHKP+FCPmxo605QAQCs7XmQ@mail.gmail.com>
	<c2a74e08-6fcf-4896-ad88-fee851334362@isocpp.org>
	<n8t8bo$5ln$1@ger.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a1145392ca0fafc052ae6cf6c
X-Trace: ger.gmane.org 1454545705 27317 80.91.229.3 (4 Feb 2016 00:28:25 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 4 Feb 2016 00:28:25 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDLZJYWNDQIKFNWKWUCRUBAEP5GMQ@isocpp.org Thu Feb 04 01:28:21 2016
Return-path: <std-proposals+bncBDLZJYWNDQIKFNWKWUCRUBAEP5GMQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f70.google.com ([209.85.215.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDLZJYWNDQIKFNWKWUCRUBAEP5GMQ@isocpp.org>)
	id 1aR7mW-0005ZK-9d
	for gclcip-std-proposals@m.gmane.org; Thu, 04 Feb 2016 01:28:20 +0100
Original-Received: by mail-lf0-f70.google.com with SMTP id h66sf14626371lfb.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 03 Feb 2016 16:28:19 -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: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=Sw1GtMfjh4PApGVcs27KVUm4c4Olpu/T0skC8bJsRRo=;
        b=sU6Afbm/Xru5NZ0THOjPIotbEVPog+3TkpAuQG1auBPR8DY7ZU/Hhs3QsawpxPEwNq
         cUUJP8CKO/+E8h/978R11pPDI8gMZD9mzYeXVT8JjsfgzODTts/KoA9+Md1+Xs+jIdp3
         cIWBo8xMbEPY+hVVoFIs1JzN0u3m7QGE7mMrw1Gs3yMklR7Ibaxp55kOX1my/YUrSPJf
         627l+wCne+IvFbcn5As3ca1yJElxnwZ6ln3m7gamRaHdM2d7ww+M+cTU9C+GlUtnlQwK
         WwLAizeu7eGIKhrYyVZMRE6SQnuFik5aHBfEts3X2lTHN1zuYWRaJGTQto4RX9q46CRL
         vNXw==
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: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=Sw1GtMfjh4PApGVcs27KVUm4c4Olpu/T0skC8bJsRRo=;
        b=j2JxbghCOwOej7O+Fse/4084Ya59Kqw6MFrAranZKJquag+4a+GQov63+bgvPdT1F6
         wRKIKPrVACggFKHL0ka//nVmbomNEnE7NYskFC9j2zDP0oYHoYnKNb/G08CKe+Mq5zOd
         /ApNYe7P5K7OsAKLAUmZsrIAqp+SDm23WIi9v0RnO0DZdlyUvms1/gVBm0G8kyd/14se
         YQQBmFyfcaA21AToyjJvz0LRE/eWYzOTRRMsuGw3ny8GPzmVyD5Jde4HcdrLLYVbhNj7
         QO1PF6umnxwC1kf63W6skvIETyJSuYYZ2ecy/Xg6Qs5eLmOcgRqRrx6lYRarelmn9n54
         itAQ==
X-Gm-Message-State: AG10YOSOeTFJwW1edCQDL8Mr4/XjxcjlkKxg2HsurwIJp5IZAbg4QZO8els2DCpRlIeg3Q==
X-Received: by 10.25.213.65 with SMTP id m62mr708888lfg.2.1454545699572;
        Wed, 03 Feb 2016 16:28:19 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.14.85 with SMTP id 82ls487077wmo.38.gmail; Wed, 03 Feb 2016
 16:28:18 -0800 (PST)
X-Received: by 10.195.11.226 with SMTP id el2mr5712977wjd.112.1454545698008;
        Wed, 03 Feb 2016 16:28:18 -0800 (PST)
Original-Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com. [2a00:1450:400c:c09::230])
        by mx.google.com with ESMTPS id e63si34374410wme.95.2016.02.03.16.28.17
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 03 Feb 2016 16:28:17 -0800 (PST)
Received-SPF: pass (google.com: domain of arthur.j.odwyer@gmail.com designates 2a00:1450:400c:c09::230 as permitted sender) client-ip=2a00:1450:400c:c09::230;
Original-Received: by mail-wm0-x230.google.com with SMTP id l66so94761110wml.0
        for <std-proposals@isocpp.org>; Wed, 03 Feb 2016 16:28:17 -0800 (PST)
X-Received: by 10.28.179.84 with SMTP id c81mr27533775wmf.30.1454545697829;
 Wed, 03 Feb 2016 16:28:17 -0800 (PST)
Original-Received: by 10.27.49.8 with HTTP; Wed, 3 Feb 2016 16:28:17 -0800 (PST)
In-Reply-To: <n8t8bo$5ln$1@ger.gmane.org>
X-Original-Sender: arthur.j.odwyer@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of arthur.j.odwyer@gmail.com designates 2a00:1450:400c:c09::230 as
 permitted sender) smtp.mailfrom=arthur.j.odwyer@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-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:24184
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24184>

--001a1145392ca0fafc052ae6cf6c
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Wed, Feb 3, 2016 at 8:03 AM, Matthew Woehlke <mwoehlke.floss@gmail.com>
wrote:

> On 2016-01-30 11:33, Nicol Bolas wrote:
> > On Friday, January 29, 2016 at 8:59:22 PM UTC-5, Arthur O'Dwyer wrote:
> >> My idea was that std::getp would probably be standardized as the
> >> "packful" version of std::get, so the user wouldn't have to actually
> >> write out the implementation of getp in practice.
> >> I agree that the syntax inside this version of dotproduct is much more
> >> off-putting than the postfix-twiddle syntax. *It is uglier.* However, =
it
> >> is *conceptually cleaner*, because it doesn't introduce any
> significantly
> >> new grammar (no postfix-twiddle operator)
> >
> > It does introduce new grammar; just not at the cite of *use*. You have =
to
> > have new grammar to have multiple return values.
>
> Not only that, but you're no longer returning a tuple-like, you're
> returning *an actual parameter pack*. This implies, by extension, [...]
> all sorts of interesting implications...


Right. Adding "first-class parameter packs" would definitely open many cans
of worms, which is why the Committee hasn't done it yet. It adds many
interesting *language* issues (as opposed to *library* issues). However, I
stand by my assertion that it doesn't add any new *grammar* issues.


> what is `decltype(x)`?


Well, since x is a *pattern*, decltype(x) would also be a *pattern*. You
could turn it into a *pack expansion* by adding ... on the end.


> Can I pass `x` as a "single" parameter to a function? Can
> I pass multiple packs as distinct entities (i.e. and still know on the
> other side what belongs to which pack)?
>

There's no existing grammar to allow that, so I guess not.

>> and it doesn't introduce any new "magic names" (no hard-coding of the
> names
> >> get and tuple_element_t into the compiler).
>
> ...which is completely irrelevant. In light of P0144, we *already have
> that*. Inventing a new mechanism to do *the exact same thing*=C2=B9 is id=
iocy.
>

You're right. If P0144 is adopted, it will show that the Committee is
friendly to the idea of hard-coding the name "std::get" into the compiler.
If that happens, then my objection to "magic names" will clearly have been
overruled, and I'll happily shut up about it. The reason I'm harping on it
right now is that I'm not aware that the Committee *has* shown significant
friendliness toward P0144 yet.
In other words: Ranged for-loop syntax is a minor, but IMHO inconclusive,
precedent in favor of hard-coding magic names. Adoption of P0144 would be a
*major* precedent in favor =E2=80=94 I'm just not aware that P0144 has in f=
act
*been* adopted. :)

=E2=80=93Arthur

--=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/.

--001a1145392ca0fafc052ae6cf6c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wed, Feb 3, 2016 at 8:03 AM, Matthew Woehlke <span dir=
=3D"ltr">&lt;<a href=3D"mailto:mwoehlke.floss@gmail.com" target=3D"_blank">=
mwoehlke.floss@gmail.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra=
"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"=
">On 2016-01-30 11:33, Nicol Bolas wrote:<br>
&gt; On Friday, January 29, 2016 at 8:59:22 PM UTC-5, Arthur O&#39;Dwyer wr=
ote:<br>
</span><span class=3D"">&gt;&gt; My idea was that std::getp would probably =
be standardized as the<br>
&gt;&gt; &quot;packful&quot; version of std::get, so the user wouldn&#39;t =
have to actually<br>
&gt;&gt; write out the implementation of getp in practice.<br>
&gt;&gt; I agree that the syntax inside this version of dotproduct is much =
more<br>
</span>&gt;&gt; off-putting than the postfix-twiddle syntax. *It is uglier.=
* However, it<br>
&gt;&gt; is *conceptually cleaner*, because it doesn&#39;t introduce any si=
gnificantly<br>
<span class=3D"">&gt;&gt; new grammar (no postfix-twiddle operator)<br>
&gt;<br>
</span>&gt; It does introduce new grammar; just not at the cite of *use*. Y=
ou have to<br>
<span class=3D"">&gt; have new grammar to have multiple return values.<br>
<br>
</span>Not only that, but you&#39;re no longer returning a tuple-like, you&=
#39;re<br>
returning *an actual parameter pack*. This implies, by extension, [...]<br>=
all sorts of interesting implications...</blockquote><div><br></div><div>Ri=
ght. Adding &quot;first-class parameter packs&quot; would definitely open m=
any cans of worms, which is why the Committee hasn&#39;t done it yet. It ad=
ds many interesting <i>language</i> issues (as opposed to <i>library</i> is=
sues). However, I stand by my assertion that it doesn&#39;t add any new=C2=
=A0<i>grammar</i> issues.</div><div>=C2=A0</div><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex"> what is=C2=A0`decltype(x)`?</blockquote><div><br></div><div>Well, sinc=
e <font face=3D"monospace, monospace">x</font> is a <i>pattern</i>, <font f=
ace=3D"monospace, monospace">decltype(x)</font> would also be a <i>pattern<=
/i>. You could turn it into a <i>pack expansion</i> by adding <font face=3D=
"monospace, monospace">...</font> on the end.</div><div>=C2=A0</div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"> Can I pass `x` as a &quot;single&quot; parameter t=
o a function? Can<br>
I pass multiple packs as distinct entities (i.e. and still know on the<br>
other side what belongs to which pack)?<br></blockquote><div><br></div><div=
>There&#39;s no existing grammar to allow that, so I guess not.</div><div><=
br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex"><span class=3D"">&gt;&gt; and it do=
esn&#39;t introduce any new &quot;magic names&quot; (no hard-coding of the =
names<br>
&gt;&gt; get and tuple_element_t into the compiler).<br>
<br>
</span>...which is completely irrelevant. In light of P0144, we *already ha=
ve<br>
that*. Inventing a new mechanism to do *the exact same thing*=C2=B9 is idio=
cy.<br></blockquote><div><br></div><div>You&#39;re right. If P0144 is adopt=
ed, it will show that the Committee is friendly to the idea of hard-coding =
the name &quot;std::get&quot; into the compiler. If that happens, then my o=
bjection to &quot;magic names&quot; will clearly have been overruled, and I=
&#39;ll happily shut up about it. The reason I&#39;m harping on it right no=
w is that I&#39;m not aware that the Committee <i>has</i> shown significant=
 friendliness toward P0144 yet.</div><div>In other words: Ranged for-loop s=
yntax is a minor, but IMHO inconclusive, precedent in favor of hard-coding =
magic names. Adoption of P0144 would be a <i>major</i> precedent in favor =
=E2=80=94 I&#39;m just not aware that P0144 has in fact <i>been</i> adopted=
.. :)</div><div><br></div><div>=E2=80=93Arthur</div></div><br></div></div>

<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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

--001a1145392ca0fafc052ae6cf6c--

.
