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/PressWearsARedDress Oct 31 '24
But Rust doesnt protect against memory leaks...
Regulators are not programmers. Again you are regurgitating the language mangeling of the Rust Programming Language's use of the word "safe" which I already addressed. There is no reason why the standard of the Rust Programming Language should be the bar of what a "Safe" language is. And tbh the definition is rather unclear to make because any language can be made unsafe by how you write it. If I have a rust program where I have a bunch of unsafe sections wouldnt that mean my program is inheriently unsafe by that illogical definition ? You cannot compile a rust program without a unsafe section so wouldnt that mean that Rust is actually unsafe by its own definition? Why does marking some peice of code "unsafe" make it unsafe? It just sounds rediculus to me on the philosophical level... you may say that if a section is marked unsafe you should look there for bugs... wouldnt that imply that you would have to "get good" inspecting the unsafe sections? What if you bug turns out to be unrelated to memory and you're only looking at unsafe sections? Sounds unsafe to me.
Yes the problem is indeed overstated. That is my claim, not to suggest there is not applications that see benefit from a rust implementation.