220 28519 <CAFk2RUYZDrLfm7QJtTiGEOdV52K3Kvv1ZdeKvoUfd2U2Ns32MA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ville Voutilainen <ville.voutilainen@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 13:40:38 +0300
Lines: 29
Approved: news@gmane.org
Message-ID: <CAFk2RUYZDrLfm7QJtTiGEOdV52K3Kvv1ZdeKvoUfd2U2Ns32MA@mail.gmail.com>
References: <201610051238.17863.marc.mutz@kdab.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: blaine.gmane.org 1475664048 13665 195.159.176.226 (5 Oct 2016 10:40:48 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 5 Oct 2016 10:40:48 +0000 (UTC)
Cc: Herb Sutter <hsutter@microsoft.com>, Bjarne Stroustrup <bjarne@stroustrup.com>, 
	Gabriel Dos Reis <gdr@microsoft.com>
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBJ5R2O7QKGQE4GM4VYQ@isocpp.org Wed Oct 05 12:40:43 2016
Return-path: <std-proposals+bncBC5JHI7A7ALRBJ5R2O7QKGQE4GM4VYQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBJ5R2O7QKGQE4GM4VYQ@isocpp.org>)
	id 1brjcr-0002If-Vo
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Oct 2016 12:40:38 +0200
Original-Received: by mail-yw0-f199.google.com with SMTP id 202sf1598500ywx.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Oct 2016 03:40:40 -0700 (PDT)
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:from:date:message-id:subject:to
         :cc: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=YXlB+jJwNTFrnTWdQpobq0Trhaszxn2Wo5I9t21pCSo=;
        b=rZXd3MCozo57PzRgsSYU/bPJKSIFHxU4ZVkQhlAWnXeT7lJUa6TeAFTXO809SLXDom
         2TnbPGnizGKkmZ3McxF8HSkqiO1gu3GtuHZnSRsMQBkJqcuwuobuYUxutEcotng5F4pR
         9L9Ou3/Ift4TL9PNC/gssPC9UiJnKG3uXzmB28P1lKrEVRxU1NVsrE0WXf+QQgURhXW1
         pGD72NQf03zZXyN3S/Vn97eS1ezyCOHoc3PXbBO4ksY0GYyVCX0XTzUbIk1DcjmBMZBZ
         aA2jxdlX+4SifQIB8thTi2Ajbyc3rQtndlye0G21nelTXRp7cN2jS0GdYv89rrlyzNdy
         nl6A==
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:from:date
         :message-id:subject:to:cc: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=YXlB+jJwNTFrnTWdQpobq0Trhaszxn2Wo5I9t21pCSo=;
        b=cObuEU5cb3XkO+OG9bJa6mCyXfz0c0/O11wAacR1YdjeKiEG0vUXKYwIuFgzVKK5sd
         4+vpQ0No0o0SRiVnXPfb/fJUoWhOTMDTDz+3MJh2cffusVMv0eWTBte6TY8HMkEMGZ/g
         GBhHtxq7ag+yUtoOgmc7BzEYv1YVIpnkrGo0KFWiuX8TsXteIW11bE0PEkXWoX/g4NNU
         XDqu2FX1dqVg71eEhcbMa3OieTkwtgYwD9zf7m4Ahka1LMdUMRYeQNVYNCKouDfveg0Z
         uq1lQKY0ijcmo13tvNJZozJmkH0Iy1yM8vNZkM+bAjAm63g1kg4asESDAVl5Wk1RXfpj
         AP7Q==
X-Gm-Message-State: AA6/9RlL8woDVaj7rgOPi0+VuofoGv+xy0UznIflxUHwqjAir42PBAIf8i/hl7sgKtfBtw==
X-Received: by 10.129.136.198 with SMTP id y189mr2047373ywf.132.1475664039651;
        Wed, 05 Oct 2016 03:40:39 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.3.212 with SMTP id f78ls377120otf.43.gmail; Wed, 05 Oct
 2016 03:40:38 -0700 (PDT)
X-Received: by 10.31.154.22 with SMTP id c22mr6078250vke.52.1475664038959;
        Wed, 05 Oct 2016 03:40:38 -0700 (PDT)
Original-Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com. [2607:f8b0:400c:c08::22a])
        by mx.google.com with ESMTPS id t185si3893735vka.240.2016.10.05.03.40.38
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 05 Oct 2016 03:40:38 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::22a as permitted sender) client-ip=2607:f8b0:400c:c08::22a;
Original-Received: by mail-ua0-x22a.google.com with SMTP id r64so42792489uar.3
        for <std-proposals@isocpp.org>; Wed, 05 Oct 2016 03:40:38 -0700 (PDT)
X-Received: by 10.176.16.84 with SMTP id g20mr5661389uab.155.1475664038760;
 Wed, 05 Oct 2016 03:40:38 -0700 (PDT)
Original-Received: by 10.103.104.69 with HTTP; Wed, 5 Oct 2016 03:40:38 -0700 (PDT)
In-Reply-To: <201610051238.17863.marc.mutz@kdab.com>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::22a as permitted
 sender) smtp.mailfrom=ville.voutilainen@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: <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:28519
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28519>

On 5 October 2016 at 13:38, Marc Mutz <marc.mutz@kdab.com> wrote:
> In conjunction with auto deduction, the caller choosing the names means that
> the code becomes brittle in the face of changes to the return type, e.g. when
> reordering fields to fill padding holes.

There have been discussions about that, especially about fields change
their types.

>
> Structured Bindings would be acceptable if, like scripting languages, we
> didn't have anything else to work with.
>
> But we do: We can return a struct.

Structured bindings work with structs as well. If you think structured
bindings mean
you must return a tuple, you're mistaken.

> I fear Structured Bindings will lead to an explosion of *really* bad API that
> returns std::pair or std::tuple when it should return a small struct with

C++ programmers are not idiots.

-- 
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/CAFk2RUYZDrLfm7QJtTiGEOdV52K3Kvv1ZdeKvoUfd2U2Ns32MA%40mail.gmail.com.

.
