Hacker News new | ask | show | jobs
by on_the_train 294 days ago
> There are plenty of linters and tools to detect issues like this (ex: clang-tidy can scan for unnecessary value params)

Exactly, this is not an issue in any reasonable setup because static analysis catches (and fixes!) this reliably.

> but evidently these issues go unnoticed until a customer complains about it or someone actually bothers to profile the code.

No

2 comments

This is my gripe with C++ - I have to have a CI pipeline that runs a job with clang-tidy (which is slow), jobs with asan, memsan and tsan, each running the entire test-suite, and ideally also one job for clang and one for gcc to catch all compiler warnings, then finally a job that produces optimized binaries.

With Rust I have one job that runs tests and another that runs cargo build --release and I'm done...

That's a pretty heavy setup. Clang tidy is usually enough. And not slow when running locally on newly typed code in resharper for example.
I think your estimate of how many C++ devs use linters is too high.