Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
idea1434
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
idea1434
9y ago
It just makes more sense. Similar to how a<=b is equivalent to (a<b)&&(a==b). Coming up with an entirely fresh meaning for <=> involving spaceships and a conglomerated comparative threesome just seems illogical to me, gi
2.
▲
by
idea1434
9y ago
No, it would be the same as evaluating (a<b)&&(a==b)&&(a>b), not std::is_nan.
3.
▲
by
idea1434
9y ago
No, it could be used for any type. It would be equivalent to (a<b)&&(a==b)&&(a>b), but would be most useful for floating point, where this operator would evaluate to false if a or b is NaN.
4.
▲
by
idea1434
9y ago
I would like to see a spaceship operator for floating point comparison, where a<=>b means a is less than, equal to, or greater than b. It would be useful for checking that a and b aren't NaN. If either were NaN, then the comparis