3 ms·
Would you really want a default comparison where a == b does not imply a - b == 0?
by MauranKilom 8y ago
Would you really want a default comparison where a == b does not imply a - b == 0?
- yoz-y 8y agoI think it depends, in languages which have implicit type coercion I think that would hurt. In languages like swift, where you need to explicitly cast even an Int to Double it would be less of a footgun. I'd rather floats have some overloaded operator maybe ~=, for approximate comparison.