4 ms·
One thing we do in the Firefox codebase is build using a clang plugin that we wrote to statically enforce additional rules. It’s not a perfect solution , and o
by dblohm7 6y ago
One thing we do in the Firefox codebase is build using a clang plugin that we wrote to statically enforce additional rules.
It’s not a perfect solution , and obviously not built in, but it is a big help for avoiding footguns.
- wffurr 6y agoYou can do a lot to make modern C++ programming safer with linters, clang-tidy, sanitizers, valgrind, etc. But it's a lot of work and a lot of compute to bolt that on top of a fundamentally unsafe language. It's out of reach for a lot of organizations and requires a substantial amount of organizational coding discipline. It's like the old saw that gets trotted out about C and C++; you can write safe code in any language if you're disciplined about it. The point of safe languages is to make it easy and accessible to write safe code; to design into the language a "pit of success" rather than requiring a big slog to make a flawed language usable.