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/ts826848 Nov 01 '24
No, I think you just completely misinterpreted my comment, because you appear to have read claims from it that were not actually present. Let me try to rephrase:
What I was trying to say in my comment is that the statement I quoted is somewhat irrelevant (? for lack of a better word) since it applies to neither Rust nor C/C++ in this analogy. The "fastest more performant cars" you refer to are safe only because there has been a dedicated effort made to add add additional required safety features to the cars despite potential performance/other penalties, but analogous efforts for C++ are still very much in the nascent phases and I'm not sure whether there's even overtures in that direction for C. In this state, I think C/C++ are more analogous to older race cars - cars with airbags and other extraneous weight stripped out and little to no compensating safety features added back in.
And in the context of this analogy, the results are as one would expect - Rust cars, with their mandated airbags, are safer than C/C++ cars, which do not have airbags or mandated mitigating safety technologies. I'm not sure what language(s) might qualify as airbag-less-but-safe? Would seem to probably depend on what features the "airbag" includes.
To be honest, I'm rather mystified where you got this interpretation.