Re:Go 1.21 may have a clear(x) builtin
by duped on Saturday November 19, 2022 @04:43PM
(#33675093)
My point is sometimes I want NaN to compare with NaN as true when I'm using a float as a key in a table.
[ Parent
| on HN ]
Re:Go 1.21 may have a clear(x) builtin
by tialaramex on Saturday November 19, 2022 @05:30PM
(#33675511)
You are welcome to build a type which has this property and declares that it is Eq.
But Rust's built-in floating point types f32 and 64 do not have that property.