What is Rust bad at doing?

Yes. Basically the idea behind Rust (behind any statically-typed language, but Rust especially) is that you teach the compiler certain “rules of the game” and it knows if you have made bug and violated them or not.

He is better at that than any human auditor/reviewer because compiler never sleeps, it can not be distracted and while there are certain bugs, compared to human it's more-or-less infallible.

On the other hand teaching it “the rules of the game” takes time and if you are writing something where “rules of the game” are changing every day… it's better to use some language which wouldn't try to catch your mistakes — but wouldn't stop you if you realized that you got these “rules of the game” wrong yesterday.

This doesn't mean that you can't change the “rules of the game” in a Rust program! Far from it! Rust is fantastically good at helping you changing your whole program for the new rules… but that's precisely the problem in the exploration phase.

Because in that phase you often have no idea whether you want to change the “rules of the game” or not!

You want to ignore them in some local code, run the program, see how it works (or not works)… but Rust stops you! It basically says “hey, you changed the rules, go and fix your whole program from the bottom to top, then you can try to run it”!

2 Likes