220 10711 <63b4a6ef-9fa8-411d-8c6f-a65df2c88cac@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: snk_kid <korcan.hussein@googlemail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Unpacking syntax for tuples using auto
Date: Mon, 19 May 2014 14:16:48 -0700 (PDT)
Lines: 80
Approved: news@gmane.org
Message-ID: <63b4a6ef-9fa8-411d-8c6f-a65df2c88cac@isocpp.org>
References: <bbb1b249-fe99-4fa0-9db1-fbf5a810b9e5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_761_21798955.1400534208742"
X-Trace: ger.gmane.org 1400534217 10781 80.91.229.3 (19 May 2014 21:16:57 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 19 May 2014 21:16:57 +0000 (UTC)
Cc: leszek.swirski@gmail.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCG6DCXN7IPRBQPJ5GNQKGQEOEUPQVQ@isocpp.org Mon May 19 23:16:52 2014
Return-path: <std-proposals+bncBCG6DCXN7IPRBQPJ5GNQKGQEOEUPQVQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yh0-f72.google.com ([209.85.213.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCG6DCXN7IPRBQPJ5GNQKGQEOEUPQVQ@isocpp.org>)
	id 1WmUvT-0005Kq-7a
	for gclcip-std-proposals@m.gmane.org; Mon, 19 May 2014 23:16:51 +0200
Original-Received: by mail-yh0-f72.google.com with SMTP id f73sf35217366yha.11
        for <gclcip-std-proposals@m.gmane.org>; Mon, 19 May 2014 14:16:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20120113;
        h=date:from:to:cc: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:content-type;
        bh=M8EGF7WQTCsJZrzFT8hqFQ1usXdTe/duKqPaxZK21aY=;
        b=jf63RNuTT0fa6AOpUloGtX9Kxklb94XMmvb10dbWYYjGM0r3kTy+F+dORI/tb+sVlA
         XUcWWZ19pNceGyWM8HG2elF1LBkZ7rNdoAmKl0h8PFcqUKTS0r/Py6P5CC4q6KoaeagG
         k/c8jmSalZba6PvUUfMUIFCDPGyMcoOoXzcTLN4ZcSfpd4nM51PFQfhH6CWOeYa3ROO/
         ZKlOGlFX7mvINxkHlXSkDc7T7DE3CwbefBgDnjqsyK+mVf43KFRaoisursP5VNOcgXU+
         0oQRu6mg80IoXQz4idaVIq4YWjmbwFLqqY7w6cUCThKhRnylwc9kOE8/VIeWVGSRXdm6
         RsxQ==
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:cc: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:content-type;
        bh=M8EGF7WQTCsJZrzFT8hqFQ1usXdTe/duKqPaxZK21aY=;
        b=beBv0Y/xf2jllrfxwhroIX2KGdbWc+y/CqSRqCWbaC7RiJ7oFmkRjpSreSbezP9BPX
         Gn56QxbegCCTGD7dORsnF6UuB8dlStdiaMkctUO36kCLr83WNMNpz/MEwfIkDKVa7ZMb
         /aPKxt/p+LR6wF7BXbsVZjse+NXii1OE64GE9eh8lMvYMkQoBQu3O451kc1v2wrG8Wja
         uSAIKIaZmAOYOfx762jlYUfGGRR35ETa5Oi1L/ltP+0ifueNsIgbVWbksdFH40q5yDhx
         g3RBl0LBD+QAYHzWN4OCOjJkWGoa1tJeIJdQpouFyBs9kEq/D0aN1XLRRnh3sVWanilY
         i+vg==
X-Gm-Message-State: ALoCoQk/b6W0sCyEEq9d2BK4kriINgXwwmhTDPzTllHhCwm5iAmjJUZZgowIs/AG7wTeXcCQGfDd
X-Received: by 10.236.136.231 with SMTP id w67mr14666582yhi.37.1400534210165;
        Mon, 19 May 2014 14:16:50 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.84.239 with SMTP id l102ls1947262qgd.81.gmail; Mon, 19 May
 2014 14:16:49 -0700 (PDT)
X-Received: by 10.140.104.52 with SMTP id z49mr92213qge.12.1400534209606;
        Mon, 19 May 2014 14:16:49 -0700 (PDT)
In-Reply-To: <bbb1b249-fe99-4fa0-9db1-fbf5a810b9e5@isocpp.org>
X-Original-Sender: korcan.hussein@googlemail.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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:10711
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10711>

------=_Part_761_21798955.1400534208742
Content-Type: text/plain; charset=UTF-8


>
> What do people think?
>

I think you've just reinevented pattern matching! which is prevalent in 
virtually all statically typed functional programming languages. What 
you're describing in particular is just one type of pattern match, a 
deconstructing tuple pattern. There are various other kinds of patterns 
that I recommend checking it out.

I would love to see general pattern matching support added to C++ in the 
future, it's one of the most sorely, *most painfully *missed feature when 
I'm coding in C/C++. Trust me when you've been programming in a language 
with pattern matching support for a while then go to another without it, 
it's painful.

It would make the other thread about "named tuples" completely redundant, 
and to me is a hacky solution to begin with. To me pattern matching is the 
proper general solution to this and other related problems.

There is a proposal already to bring a tiny subset of pattern matching 
abilities to C++, specifically a type-case patterns but I really think we 
should just go the whole way for C++17, that would really evolve the 
language.

-- 

--- 
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 http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_761_21798955.1400534208742
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div><font color=3D"#000000" face=3D"arial, sans-serif"></font></div><d=
iv><font color=3D"#000000" face=3D"arial, sans-serif">What do people think?=
</font></div></div></blockquote><div><br>I think you've just reinevented pa=
ttern matching! which is prevalent in virtually all statically typed functi=
onal programming languages. What you're describing in particular is just on=
e type of pattern match, a deconstructing tuple pattern. There are various =
other kinds of patterns that I recommend checking it out.<br><br>I would lo=
ve to see general pattern matching support added to C++ in the future, it's=
 one of the most sorely, <b>most painfully </b>missed feature when I'm codi=
ng in C/C++. Trust me when you've been programming in a language with patte=
rn matching support for a while then go to another without it, it's painful=
..<br><br>It would make the other thread about "named tuples" completely red=
undant, and to me is a hacky solution to begin with. To me pattern matching=
 is the proper general solution to this and other related problems.<br><br>=
There is a proposal already to bring a tiny subset of pattern matching abil=
ities to C++, specifically a type-case patterns but I really think we shoul=
d just go the whole way for C++17, that would really evolve the language.<b=
r><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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_761_21798955.1400534208742--

.
