Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-29 Thread Nikita Popov
On Wed, Apr 29, 2020 at 2:35 AM Larry Garfield wrote: > On Tue, Apr 21, 2020, at 9:43 AM, Larry Garfield wrote: > > > On Mon, Apr 20, 2020, at 11:06 PM, Sara Golemon wrote: > > > Happy with the revival, and I do want to underline the "Future Work" > > > section about Partial Functions. PF will

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-28 Thread Larry Garfield
On Tue, Apr 21, 2020, at 9:43 AM, Larry Garfield wrote: > On Mon, Apr 20, 2020, at 11:06 PM, Sara Golemon wrote: > > Happy with the revival, and I do want to underline the "Future Work" > > section about Partial Functions. PF will make this version of pipes 100% > > more readable and fluent, and

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-23 Thread Guilliam Xavier
On Wed, Apr 22, 2020 at 11:32 PM Bruce Weirdan wrote: > > Haskell has & operator in Data.Function module which is exact equivalent of > the proposed feature. > Link: > https://hackage.haskell.org/package/base-4.8.0.0/docs/Data-Function.html#g:2 > Example:

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-22 Thread Bruce Weirdan
Haskell has & operator in Data.Function module which is exact equivalent of the proposed feature. Link: https://hackage.haskell.org/package/base-4.8.0.0/docs/Data-Function.html#g:2 Example: https://repl.it/repls/KindLightsalmonApplicationserver On Wed, Apr 22, 2020 at 9:09 PM Larry Garfield

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-22 Thread Larry Garfield
On Wed, Apr 22, 2020, at 3:25 AM, Guilliam Xavier wrote: > On Tue, Apr 21, 2020 at 4:44 PM Larry Garfield wrote: > > > > On Mon, Apr 20, 2020, at 11:20 PM, Stanislav Malyshev wrote: > > > Just a small pedantry note - in a comparison section, the RFC compares > > > this syntax to function

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-22 Thread Guilliam Xavier
On Tue, Apr 21, 2020 at 4:44 PM Larry Garfield wrote: > > On Mon, Apr 20, 2020, at 11:20 PM, Stanislav Malyshev wrote: > > Just a small pedantry note - in a comparison section, the RFC compares > > this syntax to function composition. But this is not function > > composition. This is a syntax

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-21 Thread Larry Garfield
Replying to a couple of people at once. On Mon, Apr 20, 2020, at 11:06 PM, Sara Golemon wrote: > On Mon, Apr 20, 2020 at 9:39 PM Ben Ramsey wrote: > > > > On Apr 20, 2020, at 20:38, Larry Garfield > > wrote: > > > > > > I've been commenting on other RFCs enough lately that I should probably >

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-21 Thread Marco Pivetta
Hey Larry, This looks good! One question arises: how do exception traces look like, if they happen mid-pipe? Is the pipe effectively attaching stack frames to the entire thing, or is it flattening the trace? Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-21 Thread Nikita Popov
On Tue, Apr 21, 2020 at 3:39 AM Larry Garfield wrote: > Hello fine people of Internals! > > I've been commenting on other RFCs enough lately that I should probably > put myself through the wringer, too. I therefore offer this RFC to add a > function pipe operator, as seen in a number of other

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-20 Thread Stanislav Malyshev
Hi! > https://wiki.php.net/rfc/pipe-operator-v2 Just a small pedantry note - in a comparison section, the RFC compares this syntax to function composition. But this is not function composition. This is a syntax sugar for calling two functions one after another, not operator that produces a

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-20 Thread Sara Golemon
On Mon, Apr 20, 2020 at 9:39 PM Ben Ramsey wrote: > > On Apr 20, 2020, at 20:38, Larry Garfield > wrote: > > > > I've been commenting on other RFCs enough lately that I should probably > put myself through the wringer, too. I therefore offer this RFC to add a > function pipe operator, as seen

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-20 Thread Mike Schinkel
A questions and a comment: 1. How will XDEBUG handle a multiline construct such as this? Will it treat as one expression, or allow breakpoints at each "link" in the pipe chain? Maybe this is a better question for Derek Rethans? 2. The exclusive use of callable seems problematic prior to an

Re: [PHP-DEV] [RFC] Function pipe operator

2020-04-20 Thread Ben Ramsey
> On Apr 20, 2020, at 20:38, Larry Garfield wrote: > > Hello fine people of Internals! > > I've been commenting on other RFCs enough lately that I should probably put > myself through the wringer, too. I therefore offer this RFC to add a > function pipe operator, as seen in a number of other

[PHP-DEV] [RFC] Function pipe operator

2020-04-20 Thread Larry Garfield
Hello fine people of Internals! I've been commenting on other RFCs enough lately that I should probably put myself through the wringer, too. I therefore offer this RFC to add a function pipe operator, as seen in a number of other languages: https://wiki.php.net/rfc/pipe-operator-v2 A patch