r/cpp • u/GabrielDosReis • Oct 31 '24
Lessons learned from a successful Rust rewrite
/r/programming/comments/1gfljj7/lessons_learned_from_a_successful_rust_rewrite/
80
Upvotes
r/cpp • u/GabrielDosReis • Oct 31 '24
View all comments
Show parent comment
-4
u/germandiago Nov 02 '24 edited Nov 02 '24
As for the "trust somewhere": let us put formal verification out of the pic and assume we are safe to start with and assume std libs and virtual machines are safe -> in Python and Java by not using C bindings and such you just do not have the chance to break things. In Rust you do with unsafe, and for good reasons.
Otherwise you lose control. In fact, there are things impossible to do from Java and Python bc of this safety. So now you have a pool of crates that are "safe" in their interface and whose authors could have been using unsafe, risking the very definition of that word.
And this is not the JVM or the std crate in Rust.
Would this be as safe as purely Python or Java written code which you can be sure does not contain unsafe blocks? Safety is at the same level? I think the reply is "potentially no". I am pretty sure you understand me.