Sources of Error in Software Development
“Writing code isn’t the problem; Understanding the problem is the problem.”
In a statically typed programming language, a type-checker runs at compile time catching mistakes that would otherwise lead to runtime errors or crashes. This means that a certain class of error will be discovered earlier and earlier is better. Languages like Haskell and Scala pioneered advanced and expressive type systems, which then inspired TypeScript and static type checking in Python.
But what kinds of bugs do type checkers catch? And what bugs are invisible at the level of static typing? What are the sources of error in software development?
I wouldn’t conclude from this that static typing is useless. In skilled hands, types are a tool for understanding a problem domain, making concepts explicit and checking for internal consistency. Even so, there are certainly sources of error well outside the scope of types.
More thinking about errors
For more thinking on errors, check out this talk by Marian Petre at Strange Loop 2022: Expert Software Developers’ Approach to Error.