2 ms·
> Also many functions use addition and what is one supposed to do in case of overflow? Honestly this is where you'd throw an exception. It's a shame Rust refus
by kllrnohj 1y ago
> Also many functions use addition and what is one supposed to do in case of overflow?
Honestly this is where you'd throw an exception. It's a shame Rust refuses to have them, they are absolutely perfect for things like this...
- brooke2k 1y agoI'm confused by this, because a panic is essentially an exception. They can be thrown and caught (although it's extremely discouraged to do so). The only place where it would be different is if you explicitly set panics to abort instead of unwind, but that's not default behavior.