220 28532 <bdc55144-9d72-4661-958c-3582a535b579@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Greg Marr <gregmmarr@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: A plea to reconsider adding Structured Bindings
 to language
Date: Wed, 5 Oct 2016 07:20:02 -0700 (PDT)
Lines: 122
Approved: news@gmane.org
Message-ID: <bdc55144-9d72-4661-958c-3582a535b579@isocpp.org>
References: <201610051238.17863.marc.mutz@kdab.com> <201610051300.02280.marc.mutz@kdab.com>
 <CAKgx6B+kywTPwYVRt3P5KDQ_=xMUuHzSJv6x21L5j1ExPz6bkQ@mail.gmail.com>
 <201610051411.30312.marc.mutz@kdab.com> <073a7698-1388-4858-b6fa-b2b62a4fb6f1@isocpp.org>
 <CAFk2RUZwZLgNW6-XjHaZO+-aPa7AsA8EsHO9Vbf=x+FHe-GL-Q@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_4423_380988592.1475677202981"
X-Trace: blaine.gmane.org 1475677218 15249 195.159.176.226 (5 Oct 2016 14:20:18 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 5 Oct 2016 14:20:18 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDEZH3XFPIIJHGGUX4CRUBFNOX3PY@isocpp.org Wed Oct 05 16:20:14 2016
Return-path: <std-proposals+bncBDEZH3XFPIIJHGGUX4CRUBFNOX3PY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f199.google.com ([209.85.217.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDEZH3XFPIIJHGGUX4CRUBFNOX3PY@isocpp.org>)
	id 1brn3I-0002wJ-LI
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Oct 2016 16:20:08 +0200
Original-Received: by mail-ua0-f199.google.com with SMTP id p25sf162417668uaa.3
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Oct 2016 07:20:11 -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=W7ZhHrlaftG6EV3zjccE9fp0Ncr7UutHjg7U32sMbCM=;
        b=0mqrjqpi4ufh76H8vfr4yEz/viDwbQezv/fmQD7hxRQBdPN0InmKrferxKVRqFsCb0
         8f9Y8B19ERLScRWyEqDXAw2qo0vqPe49CkJQhPJrbYJwOKR90WU+I5VE0d0a52hQ7kRf
         T2R8iS4I2NsOZ6jo9dxJnBJOvNmB4I++yBUh9dPjgGg1o6IcoOIWbOazbViwwstR3A7I
         zfUhFLEuNHdAfuRYWkNF8Fdnqqma/I9aRviTLIqRBiSDwxOrMA2l8Upt4OajEUNOsqXE
         5KYnf1XIeOHQ1Fs276uoGUDg62DWUOHZVbN8G1g8k+UUz794r0C4Yq7AgyhZcqZPcxR/
         /LOw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        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=W7ZhHrlaftG6EV3zjccE9fp0Ncr7UutHjg7U32sMbCM=;
        b=ktriBLQa29OPIhPZ60mbj3JG8xIQlopcCB6s047+8H1+1/Lh7w79oDIIxGqYomOmgJ
         e+5Hkt4nAH2RxpEp8l8x0CRi+Ul52jR3T33zPH9owl83e0KUZ1UXT8YvffPLLky9VXse
         FHSnFNrnVn0m0/kSOYxwMysjgfDzFP+0tYYdj/1Yl2fmJSHu5Z9KCdxqAS/oYpovcx7a
         6T6daRlAP5rORomoA6ghsVTqJytZQZtLUv42jqfx3JufIinDADuCSWH4rpXpOL2mBKyP
         Z5BhFpNfsTrORp20eczwX/nuDEV7eJ3rYhZDnh6vvSwnR6XjSfTQ0LfVXsQjHNOe+J6V
         AJDQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        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=W7ZhHrlaftG6EV3zjccE9fp0Ncr7UutHjg7U32sMbCM=;
        b=CuVLGv9pXRZZUChwqDDanGSXbKEvsUi/Fpas0ZjLQKKuZMzB/alDGBPEeYI7T9xSUO
         6YNT/sMHY4A0Q5uAAq0oo/C11kL7r6LNwvlzeq602csfbzBBz8YZ1vYj4Yu7z2KIlcH0
         0KfBMiQiAwQARemwVWMsmJOEcxpEXukzKjMDA6zXNbLqPQtrPRntc0KOor1mJYLkAwaB
         THusH3yZ/Qf2HGhyOt+gIPXEX5UAUwaybcIbPawYhHbf+1xbtx/5nFS1tt7rQu+iiPoy
         LHWn4UhRu+QCbT+Xf9Afgb9Gt8QcKeehEuCHGffSWAKaS2vFwuCzlTZ27MdKiw821P8Q
         n8rA==
X-Gm-Message-State: AA6/9Rn12ygBtoOXm4prnYtdl4BMA2aVcaiNGCj5LjiTjcQom541ZCExVWkKsiLl0S9jBg==
X-Received: by 10.176.67.68 with SMTP id k62mr2279301uak.27.1475677210445;
        Wed, 05 Oct 2016 07:20:10 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.122.12 with SMTP id a12ls4468830itc.22.canary; Wed, 05 Oct
 2016 07:20:03 -0700 (PDT)
X-Received: by 10.36.71.141 with SMTP id t135mr693622itb.10.1475677203602;
        Wed, 05 Oct 2016 07:20:03 -0700 (PDT)
In-Reply-To: <CAFk2RUZwZLgNW6-XjHaZO+-aPa7AsA8EsHO9Vbf=x+FHe-GL-Q@mail.gmail.com>
X-Original-Sender: gregmmarr@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:28532
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28532>

------=_Part_4423_380988592.1475677202981
Content-Type: multipart/alternative; 
	boundary="----=_Part_4424_921199171.1475677202981"

------=_Part_4424_921199171.1475677202981
Content-Type: text/plain; charset=UTF-8

On Wednesday, October 5, 2016 at 10:07:29 AM UTC-4, Ville Voutilainen wrote:
>
> On 5 October 2016 at 16:49, Greg Marr <greg...@gmail.com <javascript:>> 
> wrote: 
> > On Wednesday, October 5, 2016 at 8:09:43 AM UTC-4, Marc Mutz wrote: 
> >> 
> >> On Wednesday 05 October 2016 13:40:20 Domen Vrankar wrote: 
> >> > So you're saying that returning a structure with error status and 
> result 
> >> > or 
> >> > multiple results of which you only need one or two (reason being for 
> eg. 
> >> > cheaper to return all at once - due to for e.g. web service call or 
> >> > complex 
> >> > processing - than request one by one on need to basis) you would 
> still 
> >> > prefer dragging the entire structure around giving the feeling that 
> your 
> >> > code has more dependencies than it actually does? 
> >> 
> >> One of us is not underatanding SB correctly, or I don't understand you. 
> SB 
> >> stores the whole struct, too, it just defines local aliases to the 
> member 
> >> of 
> >> the struct (or tuple, or pair, or ...). 
> > 
> > 
> > Only if you say that you want references, using "auto &" or "auto &&". 
>  If 
> > you use "auto", you just get copies. 
>
> You get a copy of the whole struct, not copies of individual bindings. 
>

That's not what's described in the paper.  Has it changed 
since https://isocpp.org/files/papers/p0217r0.html ?
The binding results in individual variables, and if they're copies of the 
values from the struct, there is no reason to keep the original struct 
around.

-- 
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/bdc55144-9d72-4661-958c-3582a535b579%40isocpp.org.

------=_Part_4424_921199171.1475677202981
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, October 5, 2016 at 10:07:29 AM UTC-4, Ville =
Voutilainen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 5 October=
 2016 at 16:49, Greg Marr &lt;<a href=3D"javascript:" target=3D"_blank" gdf=
-obfuscated-mailto=3D"T2-luHV4BwAJ" rel=3D"nofollow" onmousedown=3D"this.hr=
ef=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javasc=
ript:&#39;;return true;">greg...@gmail.com</a>&gt; wrote:
<br>&gt; On Wednesday, October 5, 2016 at 8:09:43 AM UTC-4, Marc Mutz wrote=
:
<br>&gt;&gt;
<br>&gt;&gt; On Wednesday 05 October 2016 13:40:20 Domen Vrankar wrote:
<br>&gt;&gt; &gt; So you&#39;re saying that returning a structure with erro=
r status and result
<br>&gt;&gt; &gt; or
<br>&gt;&gt; &gt; multiple results of which you only need one or two (reaso=
n being for eg.
<br>&gt;&gt; &gt; cheaper to return all at once - due to for e.g. web servi=
ce call or
<br>&gt;&gt; &gt; complex
<br>&gt;&gt; &gt; processing - than request one by one on need to basis) yo=
u would still
<br>&gt;&gt; &gt; prefer dragging the entire structure around giving the fe=
eling that your
<br>&gt;&gt; &gt; code has more dependencies than it actually does?
<br>&gt;&gt;
<br>&gt;&gt; One of us is not underatanding SB correctly, or I don&#39;t un=
derstand you. SB
<br>&gt;&gt; stores the whole struct, too, it just defines local aliases to=
 the member
<br>&gt;&gt; of
<br>&gt;&gt; the struct (or tuple, or pair, or ...).
<br>&gt;
<br>&gt;
<br>&gt; Only if you say that you want references, using &quot;auto &amp;&q=
uot; or &quot;auto &amp;&amp;&quot;. =C2=A0If
<br>&gt; you use &quot;auto&quot;, you just get copies.
<br><br>You get a copy of the whole struct, not copies of individual bindin=
gs.
<br></blockquote><div><br></div><div>That&#39;s not what&#39;s described in=
 the paper. =C2=A0Has it changed since=C2=A0https://isocpp.org/files/papers=
/p0217r0.html ?</div><div>The binding results in individual variables, and =
if they&#39;re copies of the values from the struct, there is no reason to =
keep the original struct around.</div><div><br></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/bdc55144-9d72-4661-958c-3582a535b579%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/bdc55144-9d72-4661-958c-3582a535b579=
%40isocpp.org</a>.<br />

------=_Part_4424_921199171.1475677202981--

------=_Part_4423_380988592.1475677202981--

.
