Claude Pache wrote:
(Actually, we would introduce an n-ary comparison operator.)
Sounds like a function ;-). Did you have straw syntax in mind?
This reminds me (not the n-ary part, but the new operator bit)...
We could also introduce binary <=>, AKA "cmp", return -1, 0, or 1.
Imagine the sort fun:
a.sort((a, b) => a <=> b)
:-P. The win over using
a.sort((a, b) => a - b)
is that <=> would work as expected for string-typed a and b as well.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss