On 22/06/14 05:09 PM, Rick Richardson wrote:
> Apologies if this has been suggested, but would it be possible to have a
> compiler switch that can add runtime checks and abort on
> overflow/underflow/carry for debugging purposes, but the default
> behavior is no check?  IMO this would be the best of both worlds,
> because I would assume that one would really only care about checked
> math during testing and dev.

You would need to build an entirely separate set of standard libraries
with checked overflow. Adding new dialects of the language via compiler
switches is never the right answer. It seems that every time an issue
like this comes up, people propose making a compiler switch as the option.

If we had compiler switches for abort vs. unwinding, no tracing gc
support vs. tracing gc support, no integer overflow checks vs. integer
overflow checks and more, we would have a truly ridiculous number of
language dialects. I think even 2 dialects is too much...

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to