News for hackers. Stuff that matters.
Re:Some mistakes Rust doesn't catch by catlifeonmars on Tuesday February 08, 2022 @09:04AM (#30258473)
> You can't fix lack of knowledge with a compiler.

The original article and the Rust language would beg to differ. The compiler generates detailed, didactic error messages with actionable suggestions.

Re:Some mistakes Rust doesn't catch by bluGill on Tuesday February 08, 2022 @09:25AM (#30258712)
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.
Re:Some mistakes Rust doesn't catch by cfcosta on Tuesday February 08, 2022 @12:05PM (#30261016)
Most of the incorrect code on the article for rust is quite contrived though. It's not perfect, just better, or more strict.
Re:Some mistakes Rust doesn't catch by bluGill on Tuesday February 08, 2022 @04:41PM (#30265156)
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.

Re:Some mistakes Rust doesn't catch by cfcosta on Wednesday February 09, 2022 @03:10PM (#30277785)
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.

Re:Some mistakes Rust doesn't catch by 10x-dev on Tuesday February 08, 2022 @01:36PM (#30262483)
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.