Comment by CodesInChaos
10 hours 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.
10 hours 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.
I 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.
Or using the saturating methods.