logoalt Hacker News

woodruffwlast Wednesday at 7:14 PM1 replyview on HN

I think unsafe Rust is harder to write than C. However, that's because unsafe Rust makes you think about the invariants that you'd need to preserve in a correct C program, so it's no harder to write than correct C.

In other words: unsafe Rust is harder, but only in an apples-and-oranges sense. If you compare it to the same diligence you'd need to exercise in writing safer C, it would be about the same.


Replies

jackrabbit1997last Wednesday at 7:24 PM

How would you describe the aliasing requirements of C and Rust, and do you consider them the same, as well as equally difficult?

show 1 reply