Note that rust doesn't claim to catch all errors, and the article points out places where it doesn't. In rust it is a lot harder to get into those situations accidentally, but you can.
Most of the incorrect code on the article for rust is quite contrived though. It's not perfect, just better, or more strict.
Any non contrived example would be thousands of lines of code. Rust is meant for those areas where you are forced to do weird things, it does it's best but they don't know how to solve the problem of what they need in a way that can't be misused.
Seeing how contrived the examples are makes me more interested in rust.
I use it professionally, and can say: it's worth it. Even the warts are minor compared to how polished and intuitive the language feels after you accept it's dogmas (or die fighting against the borrow checker).
The error messages are very good, cargo is awesome, rust analyzer is already good but still needs some time to flourish, and the performance in production is really predictable. It's for sure not perfect, but in many aspects it feels like a step forward, so much that sometimes I'm wary on how much I'm relying on the compiler to check my decisions for me.
So does clang and GCC at this point.
Re:Some mistakes Rust doesn't catch
by catlifeonmars on Tuesday February 08, 2022 @01:51PM
(#30262699)
Yes, that supports my point that it’s a useful and helpful thing to add to a compiler.
The original article and the Rust language would beg to differ. The compiler generates detailed, didactic error messages with actionable suggestions.