2 ms·
The Hack-style pipes are immediately useful even when you introduce steps that are not unary functions. With a lot of stdlib using functions / methods of highe
by nine_k 5y ago
The Hack-style pipes are immediately useful even when you introduce steps that are not unary functions.
With a lot of stdlib using functions / methods of higher arity, I suppose the Hack version will lead to shorter and easier-to-read pipes in most real codebases.
- gtf21 5y agoI understand why the Hack-style pipes are probably a better choice for JS as we find it and its ecosystem, it's just that, having switched from my main languages being JS/TS and Python to now using Haskell most of the time, this contortion was what really struck me -- the emphasis on currying and function composition in pure functional languages just makes this a lot more natural. As I said above, however, I think either method will be a fantastic addition to JS.