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

Rust does "computer" (silently overflowing) arithmetic by default. Saturating[0] and checked[1] are optionally available but require converting to methods (and some other changes for checked as it returns an Option)

[0] http://doc.rust-lang.org/std/num/trait.Int.html#tymethod.sat...

[1] http://doc.rust-lang.org/std/num/trait.Int.html#tymethod.che...



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

Search: