Re:The relative performance of C and Rust
by jacquesm on Saturday September 29, 2018 @05:16AM
(#18099455)
Bugs would be found in a Rust codebase all the time as well. The difference is that a certain class of bugs is going to be absent from safe usage of Rust. (Unsafe Rust gives you just as much rope to hang yourself with as C).
[ Parent
| on HN ]
Re:The relative performance of C and Rust
by newacctjhro on Saturday September 29, 2018 @10:05AM
(#18100385)
Unsafe Rust has a little less rope than C because there are less cases that can lead to undefined behavior (see https://doc.rust-lang.org/nomicon/what-unsafe-does.html and https://doc.rust-lang.org/reference/behavior-considered-unde...). However, once you trigger UB, it's the same.
By the way, Rust devs are working on a mathematical formalization of those rules. Here's a blog post about a part of this effort: https://www.ralfj.de/blog/2018/07/24/pointers-and-bytes.html. (There are similar formalization efforts for subsets of C, that led to software like the CompCert verified compiler)