On 11-04-16 12:34 PM, Patrick Walton wrote:
On 04/16/2011 07:26 AM, Rafael Ávila de Espíndola wrote
Please turn it off by default for user code.
But that would seem to defeat the purpose. Performance-sensitive code
could be marked unchecked, but by default it'd be safe.
Well, it defeats *a* purpose :-)
Having it off by default turns it into a debug feature or some extra
safety check for critical parts of the code.
My first thought was that having it on by default would be a problem
because it would then be legal for code to depend on it being on. This
is a similar problem with what happens in c++ with -fno-exceptions. If
you want your code to be portable, you have to not use exceptions but
still work if they are enabled.
In a second thought, integer overflow does look to be a more isolated
property. This is particularly if we don't put the overflow check in a
command line option, but in a source level construct.
So I guess it is OK to have it on by default, as long as it we are sure
it interoperates nicely with areas that have it disabled.
Patrick
Cheers,
Rafael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev