39 ms·
The tilde (~) operator is already used for Bitwise NOT[0]. [0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_NOT https:/
by tentacleuno 5y ago
The 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).