3 ms·
In Python you basically get undefined behavior when encountering NaNs while sorting, Rust let's you choose. This seems much more reasonable to me.
by whyever 12y ago
In Python you basically get undefined behavior when encountering NaNs while sorting, Rust let's you choose. This seems much more reasonable to me.
- falcolas 12y agoTo be fair, you also have the choice of implementing your own comparison function in Python (and likely Haskell, Ruby, etc) if the position of NAN actually matters to your algorithm.
- Peaker 12y agoYou're unlikely to know there's a problem and do so. Rust is reminding you of this fact, which is very nice.