On 12-12-20 11:17 AM, Niko Matsakis wrote: > This makes sense. What I really meant was: Let's not try to do this > checking during the type check itself, as we initially did, but rather > as a later lint step. This also allows you to disable it if you know > what you're doing and for some reason the code is cleaner as you wrote it.
Agreed. It's fine for a lint pass outside the type checker, I just want the semantics clearly defined in terms of a class of constant expressions. (We'll also probably need or want some more general overflow-checking attributes anyways. I've had at least 3 people react in horror when I told them that while divide-by-zero is trapped, integer-overflow _isn't_ trapped by default in my nice "safe language" :) -Graydon _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev