220 24334 <n9l3ns$33l$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: [tuple] extracting tuples out of a tuple
Date: Fri, 12 Feb 2016 12:11:24 -0500
Lines: 30
Approved: news@gmane.org
Message-ID: <n9l3ns$33l$1@ger.gmane.org>
References: <CA+wfc1-FFqOJ9OSme_SpJAmGz+cshbMDVi_dLrF1ztbzkTN-WQ@mail.gmail.com> <n9ksdc$4so$1@ger.gmane.org> <CA+wfc18LVMDXhRYhkw0PxeOmPiOoqVteF7V+40EdOOYb2K1snA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1455297107 5808 80.91.229.3 (12 Feb 2016 17:11:47 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 12 Feb 2016 17:11:47 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBRNE7C2QKGQEZF7S7NA@isocpp.org Fri Feb 12 18:11:37 2016
Return-path: <std-proposals+bncBC37LBFWUIFBBRNE7C2QKGQEZF7S7NA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f71.google.com ([209.85.215.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBRNE7C2QKGQEZF7S7NA@isocpp.org>)
	id 1aUHFm-0000yW-Vc
	for gclcip-std-proposals@m.gmane.org; Fri, 12 Feb 2016 18:11:35 +0100
Original-Received: by mail-lf0-f71.google.com with SMTP id h66sf30538986lfb.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 12 Feb 2016 09:11:34 -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: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=uEycjbHwQVVbRWzv46FuZVZnIZH0/dhRnb3Y9qCnu68=;
        b=wj4MA1hn8/twpHJN7ktri0P9H24aoFj9bwVKQ/W7JwdBILvf1NkM8mlmR5B5QWB0MA
         2viEXf2+qr69pvMNXN63KEP6puTXdfC9ebe7B1A460ZVClyITRmQjwYZ0hjSmS2H/UxG
         u1FO4Lv9F3HbJpcvgxHd6CHr0NJHLY4l1JOK+aI2dTk7FqnFA6RfOncWTKrli6ug2nqA
         PNvc9u2UUgMLxoAS5Vg5ykpvFAjgkxbBYJ9UpsPQ9zTFu1wSF1niBdPVtHT1k8NBPGth
         OM2g9QTycHOLfVb+ZPbtAjxuiwzKpWRj2m2F8aMzVUjH+AQIyqFM1J8lBVyR45AY1P05
         J6k 
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: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=uEycjbHwQVVbRWzv46FuZVZnIZH0/dhRnb3Y9qCnu68=;
        b=ituwLhanANalScbOKdgpKkDlQ1/tf9uD8PB+LVV2/3XU2FWwPS7DfDRmNnv9J4csPn
         ECOxYsXaoZYL9+8/LSPWSfUvdfrcp+QqgSZPGRL4g748benhjyqav3suflppWC3+Z433
         Y32cJUXjBmKo7ZZyXBTaJCWq2knPsS77OpB0vVAs2Vo/bV083iC2bx9ZN3wB0tiJ524B
         pNs1yGNq8WB/GIejb0zIUAD4zkz/eOkrecdKTmpm3Y+x19axGIjvTKLNxfttbr+MU9B/
         p/2wQa7hbqqV/DYh2v2mRoi9vV6qKOk+NljaW3102sq82K3IS4IYYmkwhsohswcmbGVH
         
X-Gm-Message-State: AG10YORyWWO4qIc71zpA9NurEngZiLknLfGbXjCYlslKd212jJnYdMI6YwW75JFuKIigYQ==
X-Received: by 10.112.54.202 with SMTP id l10mr432938lbp.14.1455297094608;
        Fri, 12 Feb 2016 09:11:34 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.152.136 with SMTP id a130ls383553lfe.33.gmail; Fri, 12 Feb
 2016 09:11:32 -0800 (PST)
X-Received: by 10.112.132.5 with SMTP id oq5mr1096527lbb.16.1455297092649;
        Fri, 12 Feb 2016 09:11:32 -0800 (PST)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id n31si7388671lfi.118.2016.02.12.09.11.32
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Fri, 12 Feb 2016 09:11:32 -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 1aUHFj-0000vZ-Jg
	for std-proposals@isocpp.org; Fri, 12 Feb 2016 18:11:31 +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>; Fri, 12 Feb 2016 18:11:31 +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>; Fri, 12 Feb 2016 18:11:31 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 21
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: <CA+wfc18LVMDXhRYhkw0PxeOmPiOoqVteF7V+40EdOOYb2K1snA@mail.gmail.com>
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:24334
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24334>

On 2016-02-12 11:30, Oliver Kowalke wrote:
> 2016-02-12 16:06 GMT+01:00 Matthew Woehlke <mwoehlke.floss@gmail.com>:
>> I'm not a fan of using magical references to do indirect assignment,
>> i.e. any of your proposals, but especially `split`. All of these seem
>> backwards, i.e. should be `tpl1 = head<3>(tpl);` instead.
> 
> I've had std::tie() in mind,
> 
> int i...;
> X x...;
> std::tie( i, x) = get_tuple();

That's also a horribly ugly interface that we shouldn't be perpetuating;
http://wg21.link/p0144 solves that exact example ever so much better...

At any rate, 'tie' is a much better name for a magic assignment
helper... mainly, because the verb matches the actual action that is
occurring (I could live with 'splice' more than 'split').

-- 
Matthew

-- 

--- 
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.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-proposals/.

.
