On Fri, Feb 7, 2025, at 1:36 AM, Eugene Sidelnyk wrote:
> Hi, Larry, That's super! I hope it will pass!
>
> Oladoyinbo, IMO the way it is described right now (e.g. explicit 
> closures) is much more elegant than a new way of doing things that's 
> not so obvious and will be necessary to keep in mind and support 
> anyway. 
>
> If it'd be necessary to simplify the stuff, like passing particular 
> parameter from the input pipe into the function at the particular 
> position, - I think it would be possible to do it with partial function 
> application I hope to see in the future. (e.g. bind callback for 
> array_map function, making a new function for the pipe that will accept 
> the only parameter - input array)
>
> Thank you 

Both of you, please don't top post. :-)

That said, Eugene is correct.  Hack (Facebook's PHP fork) had a pipe operator 
that took an expression with a magic placeholder on the right, rather than a 
callable.  Every other language splits it into two parts, a pipe that takes a 
function on the right and some way to do easy partial application.  I am firmly 
of the belief that Hack is wrong on this one and two separate features that 
dovetail together is the superior design over making a single pipe syntax that 
is less flexible.  Especially with FCC now, any purpose-built unary function 
will be trivial to use, and a higher-order function that returns a unary 
function is also trivial to write.

As noted in Future Scope, I do want to revisit the PFA RFC at some point, but I 
need a collaborator who can help with the implementation as that is definitely 
over my head.  (I have ideas for how to simplify the implementation, in 
concept, but my engine skill is too low to do it myself.)

--Larry Garfield

Reply via email to