5 ms·
What's wrong with a pipeline operator? JS is getting one as well. https://github.com/tc39/proposal-pipeline-operator https://github.com/tc39/proposal-pipeline-
by dsego 8y ago
What's wrong with a pipeline operator? JS is getting one as well.
https://github.com/tc39/proposal-pipeline-operator https://github.com/tc39/proposal-pipeline-operator
Chaining calls in JS means that a function returns the original object, piping is actually passing over the result as an argument, so it's semantically different.
- dragonwriter 8y ago> What's wrong with a pipeline operator? Honestly, for the use case, the same thing that's wrong with a (mandatory) visible function application operator in Haskell. > Chaining calls in JS means that a function returns the original object, piping is actually passing over the result as an argument, so it's semantically different. The syntax Flux uses for creating the result is the same as JS would use for mutating an inbound object, so it actually would be consistent if pushing the result used the same syntax as passing the (mutated) original object would in JS. Though I’d prefer whitespace for piping just like Haskell does for application. If your are going to specialize a language for a domain, don't be timid about it.