| This is a misconception. You are flat put wrong, and spreading misinformation about it doesnt help anyone. If you use any rust, and that includes dependencies and the standard library with unsafe code, bugs in the unsafe code can and do cause segmentation faults. Its easy to say, 'well, thats a bug in the library, not a problem with rust', but thats the same as with C++ isnt it? If you can assert any code is 100% bug free then why do we care about the nice safety features in rust? What is true is that any 'safe' code path that never enters an unsafe block in rust proveably cannot result in certain types of failures. BUT every rust program uses unsafe code. In the standard library. In c bindings. In 'safe' pure rust dependencies (with hidden unsafe blocks). In loading dynamic libraries. Its completely unavoidable. What are going to do? Vet every line of every part of every dependency in the code you use? Dont be ridiculous. Do you use rust? ..because practically speaking it does crash. Not often, sure. ...but this falacy that rust is 'provably safe' is absolutely false. Its provably false. Thats why people saying it is unfortunate; it makes the rust community look like a bunch of clueless fanboys. Please stick to reality. Rust has a zero cost memory management strategy and a smart compiler that helps to prevent certain types of common errors. We dont need to step into magical fairy land to convince people rust is good. It stands on its own merit easily enough. |
In other words I'm talking about code the programmer makes themselves.
>Its easy to say, 'well, thats a bug in the library, not a problem with rust', but thats the same as with C++ isnt it?
In C++ nothing prevents the lines I write from having memory errors. It's not the same at all.
>If you can assert any code is 100% bug free then why do we care about the nice safety features in rust?
Oh well you shouldn't do that, but you also don't have to use unsafe code willy-nilly. In C++ everything you touch is unsafe unless proven otherwise.
>What are going to do? Vet every line of every part of every dependency in the code you use?
For unsafe blocks? Sure, that's easy.