4 ms·
> which then results in every caller ignoring the return value And a whole load of compiler warnings. Worse yet, people who ignore warnings might ignore them.
by clarry 10y ago
> which then results in every caller ignoring the return value
And a whole load of compiler warnings. Worse yet, people who ignore warnings might ignore them.
> Now imagine the advances in error detection moving to languages that catch additional classes of errors.
Languages don't catch errors, tools do. The C tooling has been and still is constantly improving.
- pjmlp 10y agoLint was created for C in 1979 as the language authors saw how easy it was to make errors, static analysis is still largely ignored by the majority of C developers nowadays. https://www.bell-labs.com/usr/dmr/www/chist.html https://www.bell-labs.com/usr/dmr/www/chist.html I am yet to see it being use in enterprise C code.
- sqeaky 10y agoIn projects with centralized build scripts, like most projects, hopefully they have -Werror or its equivalent on by default. I was speaking about the case were a group has systematically ignored warnings and they are already beyond fixing. This is a depressingly common state for many shops. The best fix I have seen to enable as many warnings as possible and treat them as errors as early in the project lifecycle as possible. For whatever reason C++ shops are much more likely to do this than C shops in my experience. If the compiler isn't the "language" enough for you, then please explain how to write a buffer overflow in Javascript?