4 ms·
Readability and not having to define a function / include a dependency of common functions (see leftpad).
by philipwhiuk 9y ago
Readability and not having to define a function / include a dependency of common functions (see leftpad).
- djedr 9y agoReadability I would argue is a matter of taste here, so not a very strong argument. As for the second thing, I'd agree, but instead of introducing an operator, we could make the helper a built-in feature.
- ams6110 9y agoYeah readability is largely about what you're used to. I find the nested function calls more readable, as I've used that notation for decades going all the way back to high school math.
- fenomas 9y agoOn readability, all the code samples here are using pipe operators spread out on one line, but for anything nontrivial I think the point is to use it thusly: initialValue |> doSomething |> doSomethingElse |> reportResults In which case I think it's extremely readable compared to the alternatives.
- deleted 9y ago[deleted]
- djedr 9y agoCompare: pipe(initialValue , doSomething , doSomethingElse , reportResults ) Is it really so much more readable with the operator?