C doesn’t cause buffer overflows, programmers cause buffer overflows
October 10, 2015  

Here in the United States we are in a midst of yet another argument about guns, something that seems bizarre to those outside of the United States.

I’m struck by a weird parallel between the pro-gun movement and C programmers.

  1. Gun proponents say, “Guns don’t kill people; people kill people.” C programmers say that C doesn’t cause buffer overflows; (bad) C programmers cause buffer overflows.

  2. The data shows a very strong correlation between the number of guns in a society and the number of gun deaths. The data shows a very strong correlation between C programs and the number of buffer overflows and other memory errors.

  3. Gun proponents believe their own safety is more important than the safety of society in general. C programmers believe their choice of language is more important than the safety of society’s software.

  4. Gun proponents think that guns can be safe. C programmers think that C can be safe.

This is discouraging whether you are against guns or against unsafe languages.