3 ms·
> The first case is at least documented that it's the programmer's responsibility that the view should not outlive the object pointed to. This is the problem w
by maccard 4y ago
> The first case is at least documented that it's the programmer's responsibility that the view should not outlive the object pointed to.
This is the problem with naked pointers in the first case. We've had I don't know how many years of experience to tell us that relying on programmers to not make mistakes is a terrible idea. If documenting requirements fixed these issues we would still just be able to write C.
The problem with sanitizers is they're an opt-in addition, and like static analysis tools they have a tendency to be have some false positives, which causes people to distrust then and say "but I'd never make that mistake". Compiling with asan enabled would cause our CI build times to double, as we'd need to build with and without (and we have 4 configurations over 3 platforms. My previous project had 3 configurations over 9 platforms).