2 ms·
There's truth to that, but I also find that if I can't name something chances are that what I'm writing isn't as sensibly structured as it could be. I would ra
by ravenstine 5y ago
There's truth to that, but I also find that if I can't name something chances are that what I'm writing isn't as sensibly structured as it could be. I would rather solve these problems by creating new scopes than to effectively strip away names in favor of a chain of generic function calls.
- Zababa 5y agoThat's true, in these cases I usually write a function that's basically a composition of functions. The power of the pipeline operator is ad-hoc function composition. This is useful if you have lots of very generic functions, and don't want to name every single composition. There is already the f(g(h(x))) syntax, of course, but it's not the most readable. I do agree in general that this operator isn't really needed. Probably not worse than Python's := or structural pattern matching, it's one of those things where either you base the language on it, or you don't and adding it is not really necessary.