3 ms·
Enable sanitizers on test suites and fuzzers. Enable warnings and WError Use clang tidy and other static analyzers Actually use a modern compiler and enable
by jpc0 4mo ago
Enable sanitizers on test suites and fuzzers.
Enable warnings and WError
Use clang tidy and other static analyzers
Actually use a modern compiler and enable the safety features they ship with
Most of these things have solutions that would take years of work in an existing project so it isn't done
And it takes significantly more effort to write good modern C++ code than Rust code
So Rust wins
But I don't like writing Rust code, I do enjoy writing modern C++ code, the tradeoff is modern C++ can be a tooling nightmare... Try shipping a modern stdlib on an old platform, it is truly infuriating, I don't want to be a build systems expert but I need to be to use a safer alternative.
- physicsguy 4mo ago> Actually use a modern compiler This was always a pain point in C++ embedded space, to be fair.
- rcxdude 4mo agoAll those things you mention still have way more gaps in them than the rust compiler. They're just not really substitutes (fuzzing and sanitizing do still have their place in rust, though).
- pjmlp 4mo agoMy experience is that unless that is pushed by DevOps teams, and being strict about it, no matter how long a build is broken, eventually they get disabled because there is this critical delivery, and then they are never enabled again. Any language that isn't copy-paste compatible with C (or a subset of it), wins. That is the biggest issue, old habits and old teaching materials keep working, a plus, and a curse.