Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In Python you basically get undefined behavior when encountering NaNs while sorting, Rust let's you choose. This seems much more reasonable to me.


To 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.


You're unlikely to know there's a problem and do so.

Rust is reminding you of this fact, which is very nice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: