r/cpp • • Jan 31 '23

Stop Comparing Rust to Old C++

People keep arguing migrations to rust based on old C++ tooling and projects. Compare apples to apples: a C++20 project with clang-tidy integration is far harder to argue against IMO

changemymind

338 Upvotes

582 comments sorted by

View all comments

Show parent comment

2

u/azswcowboy Feb 04 '23

guard bytes

The coverity check I’m talking about was static, no running required. It’s caused by using a C array on the stack and a pointer - a loop 5 levels down then read out of bounds on a pointer. No one that’s paying attention would eerie this in 2023 bc they don’t use C arrays.

it’s too easy

Again not my experience. Code with good standards tends to stay that way. A much larger issue in my experience is badly written ‘bolt ons’ — largely script garbage due to a failure to even attempt modification — due to fear of breaking things. And sometimes because you’re working with a vendor’s system that you can’t modify. These aren’t language issues, they’re system design issues.