Re: Pipe Operator v2

From: Date: Thu, 21 Jul 2016 13:59:46 +0000
Subject: Re: Pipe Operator v2
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-94614@lists.php.net to get a copy of this message
On 21/07/2016 00:42, Sara Golemon wrote:
With the branching of 7.1, and after some reflection on the previous feedback, I'd like to reopen discussion of the Pipe Operator RFC https://wiki.php.net/rfc/pipe-operator which I had previously put on hold. I've changed much of the argument wording of the proposal, but not the substantive feature set. If you still feel it's unworkable, I'd like to encourage you to respond with what you think would make it workable (if anything). Thanks.
It looks like the examples are all still function calls. Could you clarify what expressions would be acceptable on the right-hand side? In particular, can I assign to a variable at the end of the pipe? foo() |> bar($$) |> $result = $$; As discussed before, I think pipes would be most useful if values could "exit on the right". For which I would also like to be able to do this: foo() |> bar($$) |> return $$; (Or, as discussed, special syntax for one or both of these.) Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#94614) next »