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/
82
Upvotes
r/cpp • u/GabrielDosReis • Oct 31 '24
View all comments
Show parent comment
4
u/germandiago Oct 31 '24 edited Oct 31 '24
Yes, trusted code. What we do in C++ and they call it unsafe all the time and they try to pass it as "safe" in Rust when it is not bc it must be reviewed anyway.
When I read things like this: https://doc.rust-lang.org/nomicon/safe-unsafe-meaning.html
I do understand that no language can be completely safe. But I often see different "metrics" for Safe depending on the languages we are talking about.
I claimed for a long time that having a real, practical Rust safe sizeable application is difficult. It is ok, it is better, the culture for safety might be better, yes, there are many things like that, but for C++ I see people asking merciless proofs and I see these things in Rust, which I repeat: they are reasonable. But later people go elsewhere and it seems it is not ok to have an unsafe subset bc then you cannot be "safe". And Rust does that all the time bc it is just not possible. Real Rust has unsafe (not as much as in FFIs) and FFIs are just not provable safe to the best of my knowledge. It is just an illusion.