Hacker News new | ask | show | jobs
by danielsju6 1700 days ago
It's about reading the code in a natural order.

jquery style: a().b().c().d()

However this isn't tree shakable.

modern esm: d(c(b(a())))

this proposal: a() |> b(%) |> c(%) |> d(%)

1 comments

I think this is a good summary of why pipeline operators are long sought, more so than the proposal. If you are not fundamentally against chaining calls, there is no fundamental reason to be against pipeline operators because it can be thought as a generalization of chaining with similar pros and cons.