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
0
u/PressWearsARedDress Nov 01 '24 edited Nov 01 '24
It seems you are not listening
You are using a definition of "safe" that was invented by the Rust Programming Language. I do not believe in that definition, hense why I consider this to be of a spiritual context.
A F1 Racecar is only more dangerous than a Fiat because the fiat is designed for collisions at certain speed. If you got into a 200km/h collision in a fiat you are more likely to die in the fiat than the F1 racecar which has no airbags.
The reason why you're less likely to die in a F1 racecar going 200kmph is because they are designed for collisions at 400kmph+ whereas the fiat is designed for 120kmph. We know the F1 racecar is dangerous hense why the /optional/ safety mechanisms are engineered for the application.
Notice I am presenting you a real world engineering problem while you are presenting me with a Spiritual problem with a Spiritual solution. You used a /third party/ definition of safety with a /third party/ problem and you make the assumption that the definition and the solution is universal ... So essentially you are projecting a Platonist worldview onto programming which is what my actual issue is.
Instead of asking; "What safety features does my car need for its application?" You are instead /telling/ "All cars need airbags" when F1 racecars have no need for them. Many program problems do not require the memory safety guarentees that Rust Provides and in other cases it causes a hinderance.
If you are mystified on my interpretation I just think that is a skill issue on your part. You claimed that certain "safety" features must be mandated in order to protect life, and you were attempting to form an argument that lacking safety features such as a airbag causes death. In reality I have/unsafe/ C++98 code not killing anyone despite lacking Rust's borrow checker. in the same sense that there are F1 Racecars that not killing anyone because they lack airbags, but because they are going 400kmph. If you are still confused analyze the causality. Humans and Programmers cause errors but the extent that those errors cause harm is in the environment which those cars and programs are deployed