4 ms·
Hack is dead. Long live F#
- goto11 5y agoThis seem to be a discussion of different proposals for adding a "pipeline" operator to JavaScript. A pipeline passes an argument to a function, so foo |> bar is the same as bar(foo) Better overview here: https://gist.github.com/tabatkins/1261b108b9e6cdab5ad5df4b8021bcb5 https://gist.github.com/tabatkins/1261b108b9e6cdab5ad5df4b80... The main difference between the proposals seem to be if you should write (F# style): foo |> bar or (Hack style): foo |> bar(#) F# style is more elegant if the function takes a single argument, but Hack style adapt better when a function takes multiple arguments.
- nsonha 5y agoit was mentioned, by doing that, the proposal steps on another proposal which is partial appliation (using the ? symbol)
- nsonha 5y agoIf there is another proposal for partial application then it doesn't make sense to have a special version of it inside the pipe operator. In fact with that knowledge we can go back and say even if there was no partial application proposal you should still not have it being part of another proposal so that it can be properly introduced later instead of being burdened with backward compatibility
- rk06 5y agoGot to admit that there is a lot of effort put into this issue. But, it doesn't convince me. Hack is more intuitive to me. while F# proposal looks like it is forcing FP paradigm despite its flaws.