▲ | nilslindemann 7 days ago | ||||||||||||||||
Your simple example (`2 |> Math.sqrt`) looks great, but when the code gets more complex, then the advantage of the pipe syntax is less obvious. For example,
becomes something like
or
That looks like just another way to write a thing in JavaScript, and it is not easier to read. What is the advantage? | |||||||||||||||||
▲ | avaq 7 days ago | parent [-] | ||||||||||||||||
Uhm, don't do it, then. That's like arguing that the addition of the ternary operator is a bad one because not all if/else blocks look better when translated into it. The goal is to linearlize unary function application, not to make all code look better. | |||||||||||||||||
|