Re:Is Rust Used Safely by Software Developers?
by woodruffw on Friday July 16, 2021 @04:28PM
(#27860862)
> At least with C/C++ you KNOW you've got a problem, and have to reason about the problem carefully. With Rust, you THINK you've solved the problem, but have you?
Having written C and C++ for about a decade and Rust for about 2 years now, I don't think this is accurate: people don't reason any more carefully about C and C++ than other languages, and neither language (even in their safer subsets) encourages methodical safety thinking.
This is in direct contrast to Rust's absolute requirement that you annotate anything that isn't already safe by construction with an `unsafe` keyword. You might be wrong about the safety of whatever you're constructing, but that alone is a significantly more methodical and careful approach to encapsulating the "weak" parts of programs.
Having written C and C++ for about a decade and Rust for about 2 years now, I don't think this is accurate: people don't reason any more carefully about C and C++ than other languages, and neither language (even in their safer subsets) encourages methodical safety thinking.
This is in direct contrast to Rust's absolute requirement that you annotate anything that isn't already safe by construction with an `unsafe` keyword. You might be wrong about the safety of whatever you're constructing, but that alone is a significantly more methodical and careful approach to encapsulating the "weak" parts of programs.