4 ms·
Many safe languages still suffer from integer overflows. For example in Rust and C# you can pick between an exception being thrown, or silent wrapping when an o
by CodesInChaos 2mo ago
Many safe languages still suffer from integer overflows. For example in Rust and C# you can pick between an exception being thrown, or silent wrapping when an overflow happens.
- vhcr 2mo agoOr using the saturating methods.
- bigstrat2003 2mo agoI don't think that's suffering at that point. The programmer has made an explicit decision to let things overflow, so he should be prepared to handle that possibility. It's not like a language where overflow happens silently without warning.