Ownership and lifetimes
Ownership and lifetimes
Posted Jul 20, 2021 10:25 UTC (Tue) by anton (subscriber, #25547)In reply to: Ownership and lifetimes by mrugiero
Parent article: Announcing Arti, a pure-Rust Tor implementation (Tor blog)
Concerning integer overflow, the result with a given bit-width is the same for twos-complement arithmetic across all hardware (they all can perform modulo arithmetic, aka wrapping on overflow). And all architectures introduced since 1970 use twos-complement arithmetic exclusively (while, e.g., . So for integer overflow, the behaviour could be just standarized, no need for cop-outs like implementation-defined or implementation-specified. As an example modulo arithmetic has been standardized in Java from the start.