Conversation

This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
Rust has better support for wrapping integer arithmetic than C, since it has portable signed wrapping not requiring an opt-in compiler extension like -fwrapv. The reason it's not the default is because it's rarely intended, so it makes unintended overflows far harder to find.
1
1
The wrapping methods are rarely used. In a case where they were heavily needed, you can use types that implement the arithmetic operators as wrapping. There are very few situations where that's the case though. Standard library provides great hashing algorithms already.
1