Re:TC39 Pipeline Operator – Hack vs. F#
by Zababa on Tuesday September 14, 2021 @04:57PM
(#28531059)
I think one of the use cases is that it's easier to have a series of functions on immutable data compared to chaining classes. Considering JavaScript may get immutable data structures at some point, this would work well with them.
There is also the fact that JavaScript supports different types of programming, functional being one of them. Having a pipe operator helps you to make very clean and readable functional code.
Edit: the article also mentionned that methods can't be tree shaken. That's another improvement.
There is also the fact that JavaScript supports different types of programming, functional being one of them. Having a pipe operator helps you to make very clean and readable functional code.
Edit: the article also mentionned that methods can't be tree shaken. That's another improvement.