Hacker News new | ask | show | jobs
by vlovich123 483 days ago
It’s never either or nor does a 1:1 rewrite imply the use of unsafe or reproduced memory dangers. For example, vec[v.len()] has no memory safety issues so even if the C code did that in rust it would just panic. Similarly, the bounds checks can often end up being elided by converting to idiomatic rust with iterators and for loops. While the point for you may not be performance, the reason many systems engineers are excited about Rust replacing c/C++ is precisely because it shows promise in memory safety with equivalent or better performance which makes it an and rather than or proposition