[rust-dev] Appeal for CORRECT, capable, future-proof math, pre-1.0

Vadim vadimcn at gmail.com
Sat Jan 11 13:06:34 PST 2014


> > Hitting a slow path unexpectedly on overflow seems to me like a recipe
> for
> > unpredictable performance, which doesn't seem inline with Rust's usual
> > goals.
>
> It's certainly better than the process exiting, which is what's going
> to happen in real systems when failure occurs. Either that, or they're
> going to lose a bunch of data from the task it caused to unwind. The
> only way to make overflow not a bug is to expand to a big integer or
> use a big integer from the start.
>

IMHO, integer overflow detection should be considered strictly a security
feature.   I can think of very few cases, when after expansion to a bigint,
the program wouldn't have bombed out anyways a few lines later - on some
array access or a system API call.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140111/34d0e1da/attachment.html>


More information about the Rust-dev mailing list