3 ms·
Rust doesn't provide integer overflow safety unless explicitly requested. This is something refinement types which ATS2 provides would catch.
by nyberg 5y ago
Rust doesn't provide integer overflow safety unless explicitly requested. This is something refinement types which ATS2 provides would catch.
- mustache_kimono 5y agoThis isn't exactly true. Rust doesn't include such checks when compiled in '--release' mode. And Rust provides plenty of methods to make the programmer's intent clear and perform 'safer' arithmetic ops. See: https://doc.rust-lang.org/book/ch03-02-data-types.html?highlight=integer%20overflow#integer-overflow https://doc.rust-lang.org/book/ch03-02-data-types.html?highl...
- staticassertion 5y agoAnd unless there's an unsafe block integer overflow can not lead to a memory safety issue.