[rust-dev] Integer overflow, round -2147483648

SiegeLord slabode at aim.com
Sun Jun 22 09:16:45 PDT 2014


On 06/22/2014 11:32 AM, Benjamin Striegel wrote:
> This is a mistaken assumption. Systems programming exists on the extreme
> end of the programming spectrum where edge cases are the norm, not the
> exception, and where 80/20 does not apply.

Even in systems programming not every line is going to be critical for 
performance. There is still going to be a distribution of some lines 
just taking more time than others. Additionally, in a single project, 
there's a nontrivial cost in using Rust for the 20% of code that's fast 
and using some other language for the remaining 80%. How are you going 
to transfer Rust's trait abstractions to, e.g., Python?

 > If you don't require absolute speed, why are you using Rust?

Because it's a nice, general purpose language? Systems programming 
language is a statement about capability, not a statement about the sole 
type of programming the language supports.

C++ can be and is used effectively in applications where speed is of the 
essence and in applications where speed doesn't matter. Is Rust going to 
be purposefully less generally useful than C++? There's always this talk 
of "C++ programmers won't use Rust because of reason X". Which C++ 
programmers? In my experience the vast majority of C++ programmers don't 
push C++ to its performance limits. Are they using the wrong language 
for the job? I don't think so as there are many reasons to use C++ 
beside its speed potential.

Rust will never become popular if it caters to the tiny percentage of 
C++ users who care about the last few percent of speed while alienating 
everybody else (via language features or statements like yours). The 
better goal is a) enable both styles of programming b) make the 
super-fast style easy enough so that everybody uses it.

-SL


More information about the Rust-dev mailing list