220 35854 <260797cb-896d-4386-a2c7-1212d73f1884@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Output parameters
Date: Sun, 10 Dec 2017 10:40:44 -0800 (PST)
Lines: 280
Approved: news@gmane.org
Message-ID: <260797cb-896d-4386-a2c7-1212d73f1884@isocpp.org>
References: <1c1bb50b-2d59-4247-a158-158065fb1a9a@isocpp.org>
 <0c471d5c-b9b2-40f9-a2bf-908edbb1f272@isocpp.org> <17e3b13c-eb1b-fc2c-590e-3d394f164f9a@wanadoo.fr>
 <d750d914-94c4-4f17-b20d-bc8ca51f58ea@isocpp.org> <1c8e3ec4-6c5f-43db-bb6e-131d725f7ba4@isocpp.org>
 <CADbh+eTfRrCVvisr2=OGCBX5=PATnzv_0gMCFax-_LBf+wUhuQ@mail.gmail.com> <b6de859f-6d3b-4a0c-853a-1e76feb6a107@isocpp.org>
 <CAC+0CCP=5yjgToSCFpjn6E3pasweJhj_HuyxwJ4C1k2h4cFtfA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_165_351678291.1512931244137"
X-Trace: blaine.gmane.org 1512931244 20618 195.159.176.226 (10 Dec 2017 18:40:44 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 10 Dec 2017 18:40:44 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBLP7WXIQKGQE3K2I3ZA@isocpp.org Sun Dec 10 19:40:40 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBLP7WXIQKGQE3K2I3ZA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f198.google.com ([209.85.217.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBLP7WXIQKGQE3K2I3ZA@isocpp.org>)
	id 1eO6Wm-0005B0-5N
	for gclcip-std-proposals@m.gmane.org; Sun, 10 Dec 2017 19:40:40 +0100
Original-Received: by mail-ua0-f198.google.com with SMTP id v15sf10661522uae.23
        for <gclcip-std-proposals@m.gmane.org>; Sun, 10 Dec 2017 10:40:47 -0800 (PST)
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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=niPU0FA0v4I9xhlgaIn5kOzJpOoOLwpn+WWizLsR+gE=;
        b=R5O2/HRrN+yITOaNjqhA9IntrT4YtIEkoaVtEevZqSZmIcZlvMrEul3XjBhxjopvl3
         ijs6AJy3XM2eIOKfov3FGoQ/bUhBMOKlkOlOiUPDSic9rYUby2F1hbxz7jGk4KLV5Ox6
         r927NIZr84mYczUjDb2l473OKr7o22J+37ENS/ni+s6pu53huTvgrNsEszaxNZHnnb7B
         hQiNcmoEnxUYgQ0Ac+Oz8vD7EYQ2zRRpcA3C0E+EfLLEu9bGO35/JnXAdEqRm/Y1hXZh
         mNVCqijdIIO/uy8zG/IuWcXxelenzrd9Uwl6NO2GZWz5VlGIcJ58/s5H/X4bAr6VQTk3
         vaZA==
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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=niPU0FA0v4I9xhlgaIn5kOzJpOoOLwpn+WWizLsR+gE=;
        b=BQJJc+suMriD+pSyuR+YDnQkIAcmoE3K+cIcGWpF4ifNcbUQDLrtIxhLwJW+lsbuZQ
         Oz3AnC/6HUwAhI1gJv97WyZp1o1AE49KiY1pG48cyJO924DA2QwxKRXlXv5njhWgtQso
         SL+GExhWBJ7Q2r1PX8b1p5l9ogpLOalzMMYmWvGcC1vr1323HYXxw5rmCwrk5xe5E95U
         Po/ygimvJ+MhAA7R7qkOU6Atwt6OTML+JRv+g31+7+5mMYbY8EPg0yUAEE5Ss/pvNX5Q
         /MvQSsmxbZun4M2JVSN94L9IIbaMX9oCC+IHtj6wMtlzZd+Z0IdLZ8JWzuySazWoL2MF
         iZ1g==
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=niPU0FA0v4I9xhlgaIn5kOzJpOoOLwpn+WWizLsR+gE=;
        b=Kvh8Xuz+Hzu+cRBTF//29X3nyj3AZaV7x4z626Js7LjWRYEPYyUrnn+gmMOcJ8gg50
         RdBN1eH1mgwbti2Ntg0ACluRshCrDEYVgnp274W/VGhoCj+Z6pT6AHPFYAgjwR93Hwy5
         Mh1fBuYdDsk7++mItr0vc8qRUlG60/GBwPdYcYHx6JzkTWWlgYC50qFSHDmgyWlI9Lul
         pfaxOJQnsDi3K4jWq5cyDQG6WILhDK3Y6ym6k0Ydlvd2PV8kW0ZnQTb0s9DFiTR6D0ky
         bglqcxAr9sFpxyRidUtgKkPLnDjrk8nrvPWo41Ghzr9hdrzofpuVB0tjoVHYEk+V0r0l
         4bqw==
X-Gm-Message-State: AKGB3mLCzB+cWZCRwFOnLdC39CRDf5cFgrlRW/rgrhVm5MWV+mdgenJn
	F9N+JDL/FQCC6LrB15rUs0KDmg==
X-Google-Smtp-Source: AGs4zMbvChdasfcuNOnrhpyuJhLF5cT7L4v9qsoKIGlC4VjZ+D+E1FEh1XILM//MGU6T2KkuJ4T9Sg==
X-Received: by 10.176.11.9 with SMTP id b9mr10246547uak.105.1512931246985;
        Sun, 10 Dec 2017 10:40:46 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.176.95.34 with SMTP id p34ls2014630uah.5.gmail; Sun, 10 Dec
 2017 10:40:45 -0800 (PST)
X-Received: by 10.31.2.148 with SMTP id 142mr1925344vkc.1.1512931244731;
        Sun, 10 Dec 2017 10:40:44 -0800 (PST)
In-Reply-To: <CAC+0CCP=5yjgToSCFpjn6E3pasweJhj_HuyxwJ4C1k2h4cFtfA@mail.gmail.com>
X-Original-Sender: jmckesson@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:35854
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35854>

------=_Part_165_351678291.1512931244137
Content-Type: multipart/alternative; 
	boundary="----=_Part_166_260512758.1512931244137"

------=_Part_166_260512758.1512931244137
Content-Type: text/plain; charset="UTF-8"

On Sunday, December 10, 2017 at 12:48:09 PM UTC-5, Jake Arkinstall wrote:
>
> One-off return types often occur... the first time you use them. Then, the 
> next time you use them, which is often the case later down the line, you're 
> tied to using whatever approach you used the first time unless you want to 
> either be inconsistent or introduce breaking changes.
>
> I think of this as a DRY-trap. If you are to keep repeated code to a 
> minimum, you need to make decisions early on such that you don't end up 
> forced into repeating code. For example, with strictly output parameters, 
> you need to create those variables before the function is called (and if 
> you call this function in several places, this means repeating). If you 
> want to use an unnamed struct, you have to do the same thing unless you 
> auto it out (but then you might as well just name that struct and be done 
> with the matter).
>
> This argument only applies to the justification "it's only used once". 
> There are other justifications, such as resource usage (covered by 
> Vincente) and scope control (*{ cheap a; {expensive b; do_something(a,b); 
> handle_b(b); } use_lots_of_resources(); handle_a(a); } *) for which I 
> have no rebuttal. They're completely valid.
>

I'm trying to understand this use case.

You have a function which returns two values: one is "cheap" and the other 
is "expensive". Therefore, the caller* may* want to give the "expensive" 
one a shorter lifetime. Note that the caller is not* required* to do so; 
such a user simply might want to.

In order for this to matter, "expensive" would have to be expensive in 
terms of stack space. If it were simply "expensive" in terms of dynamic 
storage (containers), then you could simply remove the data from 
`expensive` (move it into a temporary, for example).

So here's a narrow list of elements needed for this to come up:

1. The function returns an object of sufficient size that callers may want 
to get rid of it as soon as conditions permit.
2. The function returns multiple values, at least one of which is the 
aforementioned gargantuan object.
3. The multiple return values are sufficiently unrelated that they could 
reasonably have different lifetimes. That is, it is reasonable to use the 
non-gargantuan object even after the gargantuan object is gone.

This is a subset-of-a-subset-of-a-subset. I can't think of a circumstance 
where this would happen. The closest thing I can come up with here is 
something like `expected<expensive, cheap>`, where the other return value 
is something like an error code. But here, you're talking about divergent 
code paths, since `expected` is a sum type, not a product type.

Just because a use case is "valid" doesn't mean we need special language to 
support it. If the valid use case is not particularly common, we can just 
use the existing tools to handle it. The default mechanism should be to use 
return values and structs; if there is some overriding concern in a* 
specific* case, then we always have the option to take references.

Ugly solutions for unusual circumstances are fine.

Lastly, if `cheap` truly is "cheap", then there's nothing stopping you from 
doing this:

cheap a;
{
  auto [c, b] = do_something();
  handle_b(b);
  a = c;
}

It may not be the most optimal solution possible, but it gets the job done. 
And it retains *all* of the advantages of a struct-based solution.

Indeed, we may someday allow structured binding to directly assign the 
decomposed subobjects to existing objects. That would remove the need to 
use a different name and the `a = c` part. So all you would be left with is 
the overhead of one return value that never gets used after it gets 
assigned.

I think we can live with that.

I'd sooner go for a proposal that somehow adds some fairy dust to make 
> returning equally as effective in these outlying cases, than one which 
> standardises (and thus legitimizes) use of out parameters for the 
> foreseeable future. Though if the former is even possible, whoever comes up 
> with it should probably prepare to receive a lot of hate mail from compiler 
> writers.
>

The reason we have structured binding for multiple return values is because 
that doesn't require making changes to the basic ABIs used for 
communicating between functions. The kind of "fairy dust" you're talking 
about would probably require such changes; a function that uses this syntax 
will need an entire new way of communicating though ABIs.

That's going to be a hard sell, especially since the best motivation thus 
far is a corner case.

-- 
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/260797cb-896d-4386-a2c7-1212d73f1884%40isocpp.org.

------=_Part_166_260512758.1512931244137
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sunday, December 10, 2017 at 12:48:09 PM UTC-5, Jake Ar=
kinstall wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-=
left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"aut=
o"><div dir=3D"auto"><div class=3D"gmail_quote">One-off return types often =
occur... the first time you use them. Then, the next time you use them, whi=
ch is often the case later down the line, you&#39;re tied to using whatever=
 approach you used the first time unless you want to either be inconsistent=
 or introduce breaking changes.</div><div class=3D"gmail_quote" dir=3D"auto=
"><br></div><div class=3D"gmail_quote" dir=3D"auto">I think of this as a DR=
Y-trap. If you are to keep repeated code to a minimum, you need to make dec=
isions early on such that you don&#39;t end up forced into repeating code. =
For example, with strictly output parameters, you need to create those vari=
ables before the function is called (and if you call this function in sever=
al places, this means repeating). If you want to use an unnamed struct, you=
 have to do the same thing unless you auto it out (but then you might as we=
ll just name that struct and be done with the matter).</div><div class=3D"g=
mail_quote" dir=3D"auto"><br></div><div class=3D"gmail_quote" dir=3D"auto">=
This argument only applies to the justification &quot;it&#39;s only used on=
ce&quot;. There are other justifications, such as resource usage (covered b=
y Vincente) and scope control (<i>{=C2=A0cheap a; {expensive b; do_somethin=
g(a,b); handle_b(b); } use_lots_of_resources(); handle_a(a); } </i>) for wh=
ich I have no rebuttal. They&#39;re completely valid.</div></div></div></bl=
ockquote><div><br></div><div>I&#39;m trying to understand this use case.</d=
iv><div><br></div><div>You have a function which returns two values: one is=
 &quot;cheap&quot; and the other is &quot;expensive&quot;. Therefore, the c=
aller<i> may</i> want to give the &quot;expensive&quot; one a shorter lifet=
ime. Note that the caller is not<i> required</i> to do so; such a user simp=
ly might want to.</div><div><br></div><div>In order for this to matter, &qu=
ot;expensive&quot; would have to be expensive in terms of stack space. If i=
t were simply &quot;expensive&quot; in terms of dynamic storage (containers=
), then you could simply remove the data from `expensive` (move it into a t=
emporary, for example).</div><div><br></div><div>So here&#39;s a narrow lis=
t of elements needed for this to come up:</div><div><br></div><div>1. The f=
unction returns an object of sufficient size that callers may want to get r=
id of it as soon as conditions permit.</div><div>2. The function returns mu=
ltiple values, at least one of which is the aforementioned gargantuan objec=
t.</div><div>3. The multiple return values are sufficiently unrelated that =
they could reasonably have different lifetimes. That is, it is reasonable t=
o use the non-gargantuan object even after the gargantuan object is gone.</=
div><div><br></div><div>This is a subset-of-a-subset-of-a-subset. I can&#39=
;t think of a circumstance where this would happen. The closest thing I can=
 come up with here is something like `expected&lt;expensive, cheap&gt;`, wh=
ere the other return value is something like an error code. But here, you&#=
39;re talking about divergent code paths, since `expected` is a sum type, n=
ot a product type.</div><div><br></div><div>Just because a use case is &quo=
t;valid&quot; doesn&#39;t mean we need special language to support it. If t=
he valid use case is not particularly common, we can just use the existing =
tools to handle it. The default mechanism should be to use return values an=
d structs; if there is some overriding concern in a<i style=3D"background-a=
ttachment: scroll; background-clip: border-box; background-color: transpare=
nt; background-image: none; background-origin: padding-box; background-posi=
tion-x: 0%; background-position-y: 0%; background-repeat: repeat; backgroun=
d-size: auto; border-bottom-color: rgb(34, 34, 34); border-bottom-style: no=
ne; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: =
stretch; border-image-slice: 100%; border-image-source: none; border-image-=
width: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; bord=
er-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style=
: none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-=
top-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family=
: &amp;quot;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-=
size: 13px; height: auto; margin-bottom: 0px; margin-left: 0px; margin-righ=
t: 0px; margin-top: 0px; min-width: 0px; overflow: visible; overflow-x: vis=
ible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-=
right: 0px; padding-top: 0px;"> specific</i> case, then we always have the =
option to take references.</div><div><div style=3D"background-color: transp=
arent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none; bor=
der-bottom-width: 0px; border-image-outset: 0; border-image-repeat: stretch=
; border-image-slice: 100%; border-image-source: none; border-image-width: =
1; border-left-color: rgb(34, 34, 34); border-left-style: none; border-left=
-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: none;=
 border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-top-sty=
le: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: &amp;=
quot;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 1=
3px; font-style: normal; font-variant: normal; font-weight: 400; letter-spa=
cing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; marg=
in-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-ri=
ght: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-i=
ndent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-spa=
ce: normal; word-spacing: 0px;"><br></div><div style=3D"background-color: t=
ransparent; border-bottom-color: rgb(34, 34, 34); border-bottom-style: none=
; border-bottom-width: 0px; border-image-outset: 0; border-image-repeat: st=
retch; border-image-slice: 100%; border-image-source: none; border-image-wi=
dth: 1; border-left-color: rgb(34, 34, 34); border-left-style: none; border=
-left-width: 0px; border-right-color: rgb(34, 34, 34); border-right-style: =
none; border-right-width: 0px; border-top-color: rgb(34, 34, 34); border-to=
p-style: none; border-top-width: 0px; color: rgb(34, 34, 34); font-family: =
&amp;quot;Arial&amp;quot;,&amp;quot;Helvetica&amp;quot;,sans-serif; font-si=
ze: 13px; font-style: normal; font-variant: normal; font-weight: 400; lette=
r-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;=
 margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; paddi=
ng-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; t=
ext-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; whit=
e-space: normal; word-spacing: 0px;">Ugly solutions for unusual circumstanc=
es are fine.</div><b></b></div><div><b><br></b></div><div>Lastly, if `cheap=
` truly is &quot;cheap&quot;, then there&#39;s nothing stopping you from do=
ing this:</div><div><br></div><div class=3D"prettyprint" style=3D"border: 1=
px solid rgb(187, 187, 187); word-wrap: break-word; background-color: rgb(2=
50, 250, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><=
span class=3D"styled-by-prettify" style=3D"color: #000;">cheap a</span><spa=
n class=3D"styled-by-prettify" style=3D"color: #660;">;</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;"><br></span><span class=3D"st=
yled-by-prettify" style=3D"color: #660;">{</span><span class=3D"styled-by-p=
rettify" style=3D"color: #000;"><br>=C2=A0 </span><span class=3D"styled-by-=
prettify" style=3D"color: #008;">auto</span><span class=3D"styled-by-pretti=
fy" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=
=3D"color: #660;">[</span><span class=3D"styled-by-prettify" style=3D"color=
: #000;">c</span><span class=3D"styled-by-prettify" style=3D"color: #660;">=
,</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> b</span>=
<span class=3D"styled-by-prettify" style=3D"color: #660;">]</span><span cla=
ss=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"sty=
led-by-prettify" style=3D"color: #660;">=3D</span><span class=3D"styled-by-=
prettify" style=3D"color: #000;"> do_something</span><span class=3D"styled-=
by-prettify" style=3D"color: #660;">();</span><span class=3D"styled-by-pret=
tify" style=3D"color: #000;"><br>=C2=A0 handle_b</span><span class=3D"style=
d-by-prettify" style=3D"color: #660;">(</span><span class=3D"styled-by-pret=
tify" style=3D"color: #000;">b</span><span class=3D"styled-by-prettify" sty=
le=3D"color: #660;">);</span><span class=3D"styled-by-prettify" style=3D"co=
lor: #000;"><br>=C2=A0 a </span><span class=3D"styled-by-prettify" style=3D=
"color: #660;">=3D</span><span class=3D"styled-by-prettify" style=3D"color:=
 #000;"> c</span><span class=3D"styled-by-prettify" style=3D"color: #660;">=
;</span><span class=3D"styled-by-prettify" style=3D"color: #000;"><br></spa=
n><span class=3D"styled-by-prettify" style=3D"color: #660;">}</span></div><=
/code></div><div><br></div><div>It may not be the most optimal solution pos=
sible, but it gets the job done. And it retains <i>all</i> of the advantage=
s of a struct-based solution.</div><div><br></div><div>Indeed, we may somed=
ay allow structured binding to directly assign the decomposed subobjects to=
 existing objects. That would remove the need to use a different name and t=
he `a =3D c` part. So all you would be left with is the overhead of one ret=
urn value that never gets used after it gets assigned.</div><div><br></div>=
<div>I think we can live with that.</div><div><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"auto"><div dir=3D"auto"><div class=
=3D"gmail_quote" dir=3D"auto">I&#39;d sooner go for a proposal that somehow=
 adds some fairy dust to make returning equally as effective in these outly=
ing cases, than one which standardises (and thus legitimizes) use of out pa=
rameters for the foreseeable future. Though if the former is even possible,=
 whoever comes up with it should probably prepare to receive a lot of hate =
mail from compiler writers.<br></div></div></div></blockquote><div><br></di=
v><div>The reason we have structured binding for multiple return values is =
because that doesn&#39;t require making changes to the basic ABIs used for =
communicating between functions. The kind of &quot;fairy dust&quot; you&#39=
;re talking about would probably require such changes; a function that uses=
 this syntax will need an entire new way of communicating though ABIs.</div=
><div><br></div><div>That&#39;s going to be a hard sell, especially since t=
he best motivation thus far is a corner case.</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/260797cb-896d-4386-a2c7-1212d73f1884%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/260797cb-896d-4386-a2c7-1212d73f1884=
%40isocpp.org</a>.<br />

------=_Part_166_260512758.1512931244137--

------=_Part_165_351678291.1512931244137--

.
