4 ms·
A pipeline operator would be nice, but I just took a look and I agree that |> and % are difficult to read. I also think |> is hard to type, which makes it more
by dataflow 5y ago
A pipeline operator would be nice, but I just took a look and I agree that |> and % are difficult to read. I also think |> is hard to type, which makes it more painful.
Admittedly I don't have a stellar solution to this though. Only alternative I can think of is ~
- deleted 5y ago[deleted]
- tentacleuno 5y agoThe tilde (~) operator is already used for Bitwise NOT[0]. [0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_NOT https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- dataflow 5y agoThat's not an issue. This is a binary operator not a unary one.
- tentacleuno 5y agoIt is a unary operator, from my understanding of operators, as it only operators on one subject (~2). However, I very much doubt TC39 would use this character, as it would cause a great deal of confusion and poor semantics, not to mention the complexity on the engine side (does the user want NOT or pipe?)
- dataflow 5y agoNote we already use + as both binary and unary (and for both arithmetic and concatenation).