ultimaweapon
Joined 4 years ago
Joined 4 years ago
1. Microsoft don't want to open source .NET Core debugger. 2. I tired of keeping upgrade .NET on my projects. 3. Result type in Rust make me more productive than exception in .NET. 4. async/await in Rust is lightweight and a better than .NET. 5. Thread-safety in Rust is a compiler error instead of figure out by checking the docs if type is thread-safe. 6. Community libraries in Rust has a great quality and docs.
Maybe it is because you are vaccinated?
The good news is Linux now adopt Rust. In the end it will be all Rust although it may take a long time to migrate from C.
Your example code is not because it is faster to write, it is because it is impossible for its to overflow on that line.
Rust is one of the language I enjoy to use. The problem is you need to overcome its steep learning curve in order to enjoy it, which people tend to give up because it is too hard.
The problem with this is if you have a team working on a C++ product you will need some people who can catch memory bugs to review every code before merging. Even with this approach it still possible to missed some memory bugs since the reviewer need to fully understand each object lifetime, which is time consuming during code review.
I'm working on a company that run on a server application written in C/C++. The code base is very large and we always have memory bugs that required ASAN on production to fix the bugs. We have started migrating each part to Rust one year ago and we never have a single crash from Rust code. The reason we choose Rust is because it is a server application that computation intensive, latency sensitive and large amount of active connections.
Try keep using Rust until you comfortable with it and you will like it. It fit with your simple mental model. I can say this because I was a C++ users for the whole life and switched to Rust recently.
The major problem for me with Rust is deadlock. In Rust it is very easy to cause a deadlock compared to other languages. In other languages you need to think a lot before locking a mutex but in Rust you just `foo.lock().unwrap()`, which can easily cause a deadlock if you have multiple mutexes and someone in your team does not aware the lock order.