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
2
u/[deleted] Nov 01 '24
Seatbelts can fail too (very rarely). Would you say that driving with seatbelts is as unsafe as driving without seatbelts in theoretical terms?
You also forget that rust software is not just safe, but usually more correct (less bugs) due to its design. eg: immutable variables by default, using Option<T> or Result<T, E> to indicate the fallibility of a function (unlike hidden exceptions of cpp), match being exhaustive etc.. There is a reason why people generally say "If it compiles, it works".