[rust-dev] Integer overflow, round -2147483648

Andrew Poelstra apoelstra at wpsoftware.net
Sun Jun 22 16:24:50 PDT 2014

On Sun, Jun 22, 2014 at 05:26:47PM -0400, Daniel Micay wrote:
> Rust's design is based on the assumption that performance cannot be
> achieved simply by having highly optimized inner loops. It takes a whole
> program approach to performance by exposing references as first-class
> values and enforcing safety via type-checked lifetimes.
> You can write an efficient low-level loop in Haskell or Swift, but you
> can't build high level safe abstractions without paying a runtime cost.
> If someone isn't interested in this approach, then I have a hard time
> understanding why they would be using Rust.

This is a bit of an aside, but the reason to use Rust if you don't care
about performance is that it not only tracks lifetimes, but tracks
ownership as well. As a side-effect, tracking lifetimes then becomes
much easier, as does eliminating manual memory management.

This happens to also make sharing data across threads safer as well. (See
for example basically anything Niko has written on the subject.)

This, along with immutable-by-default and an aversion to magic implicit
behaviour (e.g. the Rc::clone() argument in the next thread), result in
a language which is extremely easy to analyze. It makes things harder to
write, but much easier to read.

Perhaps you can point out another language that does all this. You
definitely can't point out another language that does all this, -and-
has the massive community around it that Rust does.

So there is a strong reason to use Rust even if you don't care too much
about performance.

Andrew Poelstra
Mathematics Department, University of Texas at Austin
Email: apoelstra at wpsoftware.net
Web:   http://www.wpsoftware.net/andrew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140622/fe429e0b/attachment.sig>

More information about the Rust-dev mailing list