The pipeline proposal is great and all but it comes with it's own syntax budget; Mainly '%' has a special meaning in pipeline expressions, which I think increases the parse time quite a bit.
Another drawback is that pipeline expressions cannot be nested neatly.
foo |> f(%.call(_, bar |> /* <details> */ )) /** details: What if we want to access the outer '%' in here?? */
here's another approach:
const superhero =  as powers |> grantPower("nightvision", powers) |> make("invincible", powers) |> powers.map(x => x.toUpperCase())
But I should say that the readme of the proposal criticises temporary variables a lot. The
as binding here behaves more like the parameter of a function, the key difference being that it's reactive.
as is just a stand-in, any other operator might well work.
One interesting thought that stuck me is that this method can co-exist and connect F# and Hack pipelines.
// F# version foo |> functionX |> functionY |> functionZ // Hacky version😅 foo as arg |> functionX(arg) |> functionY(arg) |> functionZ(arg) // each `arg` kind of remains reactive like Iterable.next()
Back to smart pipelines😊
(this sort of changes the pipeline operator to pipeline construct, hope no one notices this!)