Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:114773
Return-Path: <gen.work@gmail.com>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 56959 invoked from network); 7 Jun 2021 20:46:58 -0000
Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5)
  by pb1.pair.com with SMTP; 7 Jun 2021 20:46:58 -0000
Received: from php-smtp4.php.net (localhost [127.0.0.1])
	by php-smtp4.php.net (Postfix) with ESMTP id 005161804D8
	for <internals@lists.php.net>; Mon,  7 Jun 2021 14:01:34 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net
X-Spam-Level: 
X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,
	RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_SBL,
	URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.2
X-Spam-Virus: No
X-Envelope-From: <gen.work@gmail.com>
Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by php-smtp4.php.net (Postfix) with ESMTPS
	for <internals@lists.php.net>; Mon,  7 Jun 2021 14:01:30 -0700 (PDT)
Received: by mail-lf1-f46.google.com with SMTP id r198so25221680lff.11
        for <internals@lists.php.net>; Mon, 07 Jun 2021 14:01:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :cc;
        bh=JRK+R86aWQsoYS+72Oh94M1xrtaJQtSe+wYPdyOSV9s=;
        b=mAc/pzN1wbhwezxCyF22CI3Mqk3L96clU0pFPSlyxNR+oUXkZAuzADD88Hn6fVsAfn
         H39IMQm0ZWmLiR76bi7t/Hf25kWpxPGRrANxtQ11Z7PywqdRqDeC/cu2aBEkU0UbtZSZ
         PgBgKYn4nxK0gygCRt4CLJXyN+Ut3gGHZ/2TzUCAvCsB0tGoDlxBaJCBnBJZ6/f6OnoD
         0LO06uHe4PVVxZcp+SMF4vs9TkIpHxXFDKJDBhPQVpI4/xqW2ZlDPp8jGaDTSjJ7lKvg
         Iw26/a/+0mtjSLISnofc/NhONgxfiOKP6CBRZM9cqkJ1pkrvbJ6j0UYkNfuYUPPWYA6l
         Eyig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:cc;
        bh=JRK+R86aWQsoYS+72Oh94M1xrtaJQtSe+wYPdyOSV9s=;
        b=foxSwrzGvfSPi76HLVKdrhSqdFjZv0jWjYwnKwm62MEOnknHZFMZaDEkTSoEGF7Tv+
         dEHnv3A0rWD05QszvDQguQKtrzuERWVs050mTtq3j/NilQmPCentTgxqPZRqqRQ+3rUE
         aALqW+B509GZ56QbC6Bf86KeGeML1Q8lpe5OrcSLIHlV5tp8GdWBbyL6dp1QaJP5KhcJ
         LaC+StpwyvbL7SBkCdWROfcdOBf2hvWkdyqDpTS/ch2Kn8HhMw928edoOX4gVGE7QiUG
         l3ABRXeGJPaE8F25QzEeIBonugx4yu4GcgOpZ5d8O4TgxH9oROhOTFrW8fu47xAh9MWs
         wRsA==
X-Gm-Message-State: AOAM530Zu/pYpwiwr85qHLifAlQUNqEiUQG6rN6sT/gjPACCCQ2fs2kh
	QBqGKJWMVmu0bGhxY3zD8n6L4WQaikXhbn3mNen7xprO
X-Google-Smtp-Source: ABdhPJwUCdd1hM9xjN3g9wnfVajIwQL4YyjV7SzWonsjiNcyvG4I+Ag3S77QVM0VuXpxLTUSAMCM1Gx3lq43BASiRwk=
X-Received: by 2002:ac2:5cd6:: with SMTP id f22mr13838978lfq.73.1623099688816;
 Mon, 07 Jun 2021 14:01:28 -0700 (PDT)
MIME-Version: 1.0
References: <d50eaa78-21c7-46e7-9da6-629ba5694d3f@www.fastmail.com>
In-Reply-To: <d50eaa78-21c7-46e7-9da6-629ba5694d3f@www.fastmail.com>
Date: Mon, 7 Jun 2021 23:00:52 +0200
Message-ID: <CADqioP1yah_GNZovjc1vPyK+UJs7+88AUy-hJMMt-SR8YMDubw@mail.gmail.com>
To: Larry Garfield <larry@garfieldtech.com>
Cc: php internals <internals@lists.php.net>
Content-Type: multipart/alternative; boundary="00000000000063139d05c43358c0"
Subject: Re: [PHP-DEV] [RFC] Pipe Operator, take 2
From: gen.work@gmail.com (Eugene Leonovich)

--00000000000063139d05c43358c0
Content-Type: text/plain; charset="UTF-8"

On Mon, Jun 7, 2021 at 9:03 PM Larry Garfield <larry@garfieldtech.com>
wrote:

> Hi folks. Me again.
>
> A year ago, I posted an RFC for a pipe operator, |>, aka function
> concatenation.  At the time, the main thrust of the feedback was "cool,
> like, but we need partial function application first so that the syntax for
> callables isn't so crappy."
>
> The PFA RFC is winding down now and is looking quite good, so it's time to
> revisit pipes.
>
> https://wiki.php.net/rfc/pipe-operator-v2
>
> Nothing radical has changed in the proposal since last year.  I have
> updated it against the latest master.  I also updated the RFC to use more
> examples that assume PFA, as the result is legit much nicer.  i also tested
> it locally with a combined partials-and-pipes branch to make sure they play
> nicely together, and they do.  (Yay!)  Assuming PFA passes I will include
> those tests in the pipes branch before this one goes to a vote.
>
>
FTR, there are several typos in the "Hello World" examples (*strto*t*upper,
htmlent*i*ties*). Also, these examples will not work as written because
explode() expects two arguments and will fail if you pass only one:
https://3v4l.org/tLO0s. I wonder what the correct version of the pipe
example (the one that uses strings as callbacks) would look like, given
that you have to pass two arguments for explode()?

-- 
Thank you and best regards,
Eugene Leonovich

--00000000000063139d05c43358c0--