[rust-dev] Warn about implicit integer conversion

Lucian Branescu lucian.branescu at gmail.com
Thu Dec 20 12:56:20 PST 2012

You can add me to the list of horrified people :) I'd prefer overflow to
something one opts into for small portions of their code, much like unsafe
On Dec 20, 2012 7:26 PM, "Graydon Hoare" <graydon at mozilla.com> wrote:

> 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 at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20121220/b971c511/attachment.html>

More information about the Rust-dev mailing list