Re:Writing New System Software
by jeffreygoesto on Saturday January 01, 2022 @07:27AM
(#29757751)
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?
Re:Writing New System Software
by jeffreygoesto on Saturday January 01, 2022 @07:29AM
(#29757763)
Static Analysers like Coverity, KlocWork, QA-C++ will do. Usability is... Well... Subjective.
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.