Hacker News new | ask | show | jobs
by jcelerier 1636 days ago
> In theory, yes. In practice few people use C++ fully, too often you find in-house "style-guides" vetoing specific things, such as Google's famous "no exceptions".

Almost never seen that in practice. I always see people talking about it in forums, but in real-world gigs I don't know people who artificially restrict their codebase with braindead rules like that.

3 comments

You haven't seen safety relevant code then. High SIL and ASIL levels (combined with those systems being embedded) result in such rule sets for a good reason.

I have yet to see more than "print and bail out" in catch blocks. In embedded there is nobody who can read your cry for help and especially in fail-op systems this is just not an option.

Herbceptions are just not there yet and until then we help ourselves with things like "expected" for example.

Enjoy the source code of Android, Windows and macOS frameworks.

In fact probably yet another reason why Apple and Google aren't in an hurry to improve clang to latest ISO, and other companies in clang ecosystem even less.

Are there any usable linters around to enforce such rules?
Static Analysers like Coverity, KlocWork, QA-C++ will do. Usability is... Well... Subjective.
More than the usability, the biggest problem is getting everyone onboard.