220 24345 <56BEF4DF.6070907@wanadoo.fr> article
Path: news.gmane.org!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: [tuple] extracting tuples out of a tuple
Date: Sat, 13 Feb 2016 10:18:23 +0100
Lines: 203
Approved: news@gmane.org
Message-ID: <56BEF4DF.6070907@wanadoo.fr>
References: <CA+wfc1-FFqOJ9OSme_SpJAmGz+cshbMDVi_dLrF1ztbzkTN-WQ@mail.gmail.com>
 <n9ksdc$4so$1@ger.gmane.org>
 <CA+wfc18LVMDXhRYhkw0PxeOmPiOoqVteF7V+40EdOOYb2K1snA@mail.gmail.com>
 <n9l3ns$33l$1@ger.gmane.org>
 <7e08b6c5-853c-471e-b248-a9df7e8e27be@isocpp.org>
 <CA+wfc1-NGb8G1ocpbuzC42aLhAF3KOggRev9rzBNXbL8wd5V6A@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------040705010301040704070701"
X-Trace: ger.gmane.org 1455355114 17815 80.91.229.3 (13 Feb 2016 09:18:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 13 Feb 2016 09:18:34 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBYHJ7O2QKGQELDNOXRI@isocpp.org Sat Feb 13 10:18:27 2016
Return-path: <std-proposals+bncBDH67CONY4PBBYHJ7O2QKGQELDNOXRI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f199.google.com ([209.85.217.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDH67CONY4PBBYHJ7O2QKGQELDNOXRI@isocpp.org>)
	id 1aUWLR-0006lH-Gn
	for gclcip-std-proposals@m.gmane.org; Sat, 13 Feb 2016 10:18:25 +0100
Original-Received: by mail-lb0-f199.google.com with SMTP id dx9sf34221642lbc.3
        for <gclcip-std-proposals@m.gmane.org>; Sat, 13 Feb 2016 01:18:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-type: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=1xyJXBIbi/0eHbpU/Cqnygzs21XED26+0RT9t4r45ew=;
        b=L2SOAhMoFxsEXWIJ3Tnt2FFuVxDrnF3yvNiDLmTReUWKrS9rIhOpnvfLoFy8l2j2zd
         v00Tm4Cp8rwlIULn+taEWGmirU3CHXngsm0T8J+tuHwlK8qH7VlYkKacAA7eicg6vMAG
         jcV1x9VWsMJzYw+zp9Pn6bjnH6JE1VjnrV8r1clvahiAHp6z+7AX8vHN+fa28ZmkO/qi
         RN+TkeI2S7X1eY82xX3vsb+hsj18OZM2ee8a9cg2mhcVh+wBlnbLcn0AwzEr84VuNFK3
         Uu+4ZQ0JG8YwmdZg4b6vyj9jLh1Gii1EKLcAY5w0nk4o9FtMkzXNdL1FzKbj6Cz5fGJU
         NUjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-type: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=1xyJXBIbi/0eHbpU/Cqnygzs21XED26+0RT9t4r45ew=;
        b=gijtZYga2AZnFDpfkOhJxT2+U76qc1RC7kW9W2ts9S/f+wWkr/YwOEO9tAgBfeopdU
         JIj5IdfD2K+6UefJ7YYaPccuCeTc9w7E9LqXaGs7OqqCkIUIxtMcr/TBUBpZ9dUZG4Zi
         SRtMtIIzuSx4IuLCm+3Wqd9iQIDLjCLJRB2sWJHEv4DPL6ELBf05GR49mCAUM/lWQkPj
         W38OzAsmn8WkL/tHE/fIiuwoUdWGWgdhAOpyXwRqpRzm4hjgUsZLnW/FNZIPyIHdtSJP
         /SRLQIwj4DyG5URMxO8WaodocwA4+IlORegMRpx9Pm3jzcyGOMVBryPwC29VDoy0rH6K
         NrJw= 
X-Gm-Message-State: AG10YOR8kxOUX2c6AjyKfDMi5Cp55m8dQZnCnkNpBl2emhHT4jd8PzDw/IQIrGdpEWAsTg==
X-Received: by 10.112.201.104 with SMTP id jz8mr785408lbc.13.1455355104915;
        Sat, 13 Feb 2016 01:18:24 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.228.70 with SMTP id b67ls283231wmh.42.gmail; Sat, 13 Feb
 2016 01:18:23 -0800 (PST)
X-Received: by 10.194.5.162 with SMTP id t2mr6045945wjt.38.1455355103812;
        Sat, 13 Feb 2016 01:18:23 -0800 (PST)
Original-Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr. [80.12.242.123])
        by mx.google.com with ESMTPS id xb7si25281409wjb.187.2016.02.13.01.18.23
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Sat, 13 Feb 2016 01:18:23 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.123;
Original-Received: from new-host.home ([86.214.221.89])
	by mwinf5d36 with ME
	id HlJP1s0091wL8VA03lJPMd; Sat, 13 Feb 2016 10:18:23 +0100
X-ME-Helo: new-host.home
X-ME-Auth: dmljZW50ZS5ib3RldEB3YW5hZG9vLmZy
X-ME-Date: Sat, 13 Feb 2016 10:18:23 +0100
X-ME-IP: 86.214.221.89
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0)
 Gecko/20100101 Thunderbird/38.5.1
In-Reply-To: <CA+wfc1-NGb8G1ocpbuzC42aLhAF3KOggRev9rzBNXbL8wd5V6A@mail.gmail.com>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.123 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
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:24345
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24345>

This is a multi-part message in MIME format.
--------------040705010301040704070701
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 13/02/2016 09:44, Oliver Kowalke a =C3=A9crit :
> 016-02-13 1:28 GMT+01:00 Arthur O'Dwyer <arthur.j.odwyer@gmail.com=20
> <mailto:arthur.j.odwyer@gmail.com>>:
>
>     (Also, I'm assuming that Oliver made some typos in his original
>     post =E2=80=94 notice I've flipped the "tpl" and "tpl1" in the second=
 line
>     above.)
>
>
> correct
I'm confused. Arthur's was not doing an extraction but an insertion in=20
this case

|    tail(tpl)=3Dtpl1;// Python: tpl[1:] =3D tpl1|

I believed you were talking of extraction.
>
>     Also, of course, head(x) should logically return get<0>(x), not
>     some weird synonym for reverse(tail(reverse(x))).
>
>
> head(x) should return the part from the source tuple's head that fits=20
> into tuple x, same applies to tail(x)
>
>     But that's just poor naming. The underlying operation here is
>     either "splice"
>
>
> I'm only interested in the functionality, not in the naming. One of my=20
> project requires such functionality and I was wondering that neither=20
> the standard
> provides such manipulators nor could I find a proposal.
>
> tuple ~... and tu|ple [:] require a language modification - but I need=20
> a solution now; so I've written head()/tail() (even if the naming is=20
> not perfect).|
>
I agree that we should first think in terms of the desired functionality=20
and if it is worth having it in the standard. If some additional=20
language features make this easier great.
I believe that you would need to describe more precisely what you want=20
these functions to do.

Vicente

--=20

---=20
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 e=
mail 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-propos=
als/.

--------------040705010301040704070701
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 13/02/2016 09:44, Oliver Kowalke a
      =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
cite=3D"mid:CA+wfc1-NGb8G1ocpbuzC42aLhAF3KOggRev9rzBNXbL8wd5V6A@mail.gmail.=
com"
      type=3D"cite">
      <div dir=3D"ltr">
        <div class=3D"gmail_extra">
          <div class=3D"gmail_quote">016-02-13 1:28 GMT+01:00 Arthur
            O'Dwyer <span dir=3D"ltr">&lt;<a moz-do-not-send=3D"true"
                href=3D"mailto:arthur.j.odwyer@gmail.com" target=3D"_blank"=
>arthur.j.odwyer@gmail.com</a>&gt;</span>:<br>
            <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div dir=3D"ltr"><span class=3D""></span> (Also, I'm assuming
                that Oliver made some typos in his original post =E2=80=94
                notice I've flipped the "tpl" and "tpl1" in the second
                line above.)</div>
            </blockquote>
            <div><br>
            </div>
            <div>correct<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    I'm confused. Arthur's was not doing an extraction but an insertion
    in this case<br>
    <br>
    <code class=3D"prettyprint"><span style=3D"color: #000;"
        class=3D"styled-by-prettify">=C2=A0 =C2=A0 tail</span><span style=
=3D"color:
        #660;" class=3D"styled-by-prettify">(</span><span style=3D"color:
        #000;" class=3D"styled-by-prettify">tpl</span><span style=3D"color:
        #660;" class=3D"styled-by-prettify">)</span><span style=3D"color:
        #000;" class=3D"styled-by-prettify"> </span><span style=3D"color:
        #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color:
        #000;" class=3D"styled-by-prettify"> tpl1</span><span
        style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span
        style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0 =C2=A0<=
/span><span
        style=3D"color: #800;" class=3D"styled-by-prettify">// Python:
        tpl[1:] =3D tpl1</span></code><br>
    <br>
    I believed you were talking of extraction.<br>
    <blockquote
cite=3D"mid:CA+wfc1-NGb8G1ocpbuzC42aLhAF3KOggRev9rzBNXbL8wd5V6A@mail.gmail.=
com"
      type=3D"cite">
      <div dir=3D"ltr">
        <div class=3D"gmail_extra">
          <div class=3D"gmail_quote">
            <div>=C2=A0</div>
            <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div dir=3D"ltr">
                <div>Also, of course, head(x) should logically return
                  get&lt;0&gt;(x), not some weird synonym for
                  reverse(tail(reverse(x))). </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>head(x) should return the part from the source tuple's
              head that fits into tuple x, same applies to tail(x)<br>
            </div>
            <div>=C2=A0</div>
            <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div dir=3D"ltr">
                <div>But that's just poor naming. The underlying
                  operation here is either "splice"<br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
        <div class=3D"gmail_extra">I'm only interested in the
          functionality, not in the naming. One of my project requires
          such functionality and I was wondering that neither the
          standard<br>
        </div>
        <div class=3D"gmail_extra">provides such manipulators nor could I
          find a proposal.<br>
          <span style=3D"font-family:arial,helvetica,sans-serif"><br>
          </span></div>
        <div class=3D"gmail_extra"><span
            style=3D"font-family:arial,helvetica,sans-serif">tuple ~...
            and tu</span><code><span
              style=3D"font-family:arial,helvetica,sans-serif">ple [:]
              require a language modification - but I need a solution
              now; so I've written head()/tail() (even if the naming is
              not perfect).</span><span style=3D"color:rgb(136,0,0)"></span=
></code></div>
      </div>
      <br>
    </blockquote>
    I agree that we should first think in terms of the desired
    functionality and if it is worth having it in the standard. If some
    additional language features make this easier great.<br>
    I believe that you would need to describe more precisely what you
    want these functions to do.<br>
    <br>
    Vicente<br>
  </body>
</html>

<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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

--------------040705010301040704070701--

.
