I won’t get to vote on this RFC, but I wanted to give my brief opinion. To be fair, my initial opinion was that I loved the symmetry of this along with
+=,-=, and similar operators, but really hated how I assumed it was likely be used. I started typing up a message showing examples of how it could be used, but as I did I fell in love with it.It’s a little annoying to type on the standard US Keyboard layout, but its readable as a syntax and has a clear meaning once understood. This is the example that made me really love the <> operator (with PFA):
$array |>= array_map(transform(…), …);
Glad you like it! I think it will really clean up a lot of code, particularly since
- it removes the need to duplicate the variable name on both sides
- it is more performant (through memoization) when there's an expression
involved without having to introduce an intermediate variable.
I think would be fantastic if this landed with PFA
Best,
Caleb