3 ms·
I like Rust. It adapts a lot of nice features that C++ is lacking. However it doesn’t solve any problems I have at work. I routinely deploy very large C++ appl
by deterministic 3y ago
I like Rust. It adapts a lot of nice features that C++ is lacking.
However it doesn’t solve any problems I have at work. I routinely deploy very large C++ applications to large international companies around the world.
And I haven’t had a memory or multi-threading problem causing any production issues for as long as I remember. I routinely use Valgrind and Helgrind to make sure it stays that way.
However I do have 9000+ auto tests that push the code way beyond any possible real life customer use cases. Enabling me to make major changes and optimizations to the code and drop it into production with confidence. I haven’t had a production bug for 5+ years.
Switching to Rust won’t change that. I would still need those 9000+ tests to make sure my Rust deployment would be error free.
So my point is this: No programming language will magically make your code bug free or eradicate the need for you to use sound software engineering practices like comprehensive auto tests.
There are of course languages more powerful than Rust that will allow you to write proven correct bug free code (Agda/Idris/Coq/..) However those languages won’t prove that your code has the performance and latency needed in a real world environment for example.
So I would rather spend more time polishing and improving my auto test skills rather than investing in switching languages. My ROI will be way higher.
If reading this makes you angry and eager to defend the honour of Rust and discredit what I am saying, please understand that I have nothing against Rust. This is more a summary of my current thinking on Rust and any other new programming language wanting to take over from C++.
I would love to hear the thoughts of other experienced C++ developers who are responsible for very large C++ applications used by real customers.