In what situations should you use rust?
This is coming from a beginner to intermediate programmer.
Reasons to use Rust:
- The software will be used by someone that doesn't understand software development.
- This can include customers but also co workers and management
- Includes situations where you are more that 10m from the person running it
- Why? Because all software breaks or has a bug or too. These people probably won't understand the complexities and the last thing you want to do is explain what a race condition is.
- The software will be used in the future
- If it is going to be used in the future, you would probably like it to work then. With a binary, you know it will still work months or years down the track.
- You will likely forget how the code works. At least with Rust, if you start refactoring, the compiler will make sure you don't screw something up
- Your application is security critical
- There have been a large number of breaches recently that would have been prevented by using Rust
- This is of course a trade off between a fundamental flaw.
- It needs to work first time
- While there is no guarantee that it will work as desired the first time, I have found that if a complex task builds, there is a good chance it will work.
- You want to learn how to write programs that will do the above
Reasons to not use Rust:
- It needs to be written quickly and you or your team will be using it at most once or twice within a few days/weeks
- If the job will be monitored, it will be quicker to use something less restrictive
- You can solve bugs quickly
- It only does 1 job and errors can be dealt with manually
- It is a low level thing and there are no libraries yet
- The ecosystem is still small. There aren't libraries for every task
- Most libraries are immature. The design of Rust makes this less of a problem, but for some cases this is.
- You don't know programming yet
- Rust isn't the best first language. Its design is harsh on new comers and the compiler has no feelings
- I think Rust is a great second language. You want the protection to venture out to the ledge and know that you can not blow your foot off.