3 ms·
Rust's type conversions are explicit, so a lot of the examples that invoke "integral promotion" won't compile because there is no such promotion, you need to wr
by tialaramex 5y ago
Rust's type conversions are explicit, so a lot of the examples that invoke "integral promotion" won't compile because there is no such promotion, you need to write down what you meant, giving you an opportunity to reconsider, hey, I want to subtract a large positive integer from a smaller positive integer I... huh, I guess these aren't unsigned after all, need to do some refactoring.
WUFFS types are constrained to specific ranges, so not only is there no implicit promotion or arithmetic conversion, overflow is also impossible. If it might overflow it simply won't compile.
WUFFS also doesn't believe in operator precedence, a + b * c won't compile because, what did you mean there? Write (a + b) * c or a + (b * c) depending on which you actually meant.