3 ms·
I enjoy the utility of this operator in Elixir but I'm not sure how I feel about including it in JS. My fear is that JS is trying to be all things to all devel
by waylandsmithers 7y ago
I enjoy the utility of this operator in Elixir but I'm not sure how I feel about including it in JS.
My fear is that JS is trying to be all things to all developers- it feels like we just added the `class` keyword for the OO inclined and now we're moving towards functional programming? Do we really want to move further away from the idea of idiomatic JS?
But who knows, maybe it will open the door to massive productivity and enjoyability gains with the language...
- goatlover 7y agoCan't help but wonder about the maintainability of JS codebases with all this additional stuff, particularly with things that aren't part of the language spec like the pipe operator.
- hajile 7y agoClasses require tons of work under the hood to work. In exchange, they add a confusing new concept of fields alongside protypes while also hiding the actual prototype inheritance to ensure future confusion. The pipe operator is a super-basic transformation of the AST. In exchange, you get much easier to read "nested" functions. `foo(bar(baz(x))) --> x |> baz |> bar |> foo` is very easy to teach and very easy to understand. It's hardly a fair comparison.