4 ms·
You could just use ramda https://ramdajs.com/docs/#pipe https://ramdajs.com/docs/#pipe Not quite as seamless and it would be nice to have |> but ultimatles int
by rudolph9 8y ago
You could just use ramda https://ramdajs.com/docs/#pipe https://ramdajs.com/docs/#pipe
Not quite as seamless and it would be nice to have |> but ultimatles introduces a lot of complexity.
The only good reason I could see is if there is a performance benefit a JavaScript JIT could take advantage of by having the |> operator?
- yanis_t 8y agoHonestly, I don't think so. More likely this will be just a syntactical sugar.
- WorldMaker 8y agoPerformance benefits likely depend on which side of the partial application / currying coin the operator ends up landing on. Some of the partial application proposals would potentially reduce the needs for currying in the language, which would reduce the needs for a lot of variable closures in some libraries. The biggest potential benefit is to typing (in Typescript or Flow), which potentially can provide potentially much better or at least much simpler typing and type inferencing with an operator versus many of the alternatives (such as variadic pipe() functions).