On Mon, Jun 7, 2021 at 9:03 PM Larry Garfield <la...@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