We've noticed a reduction in what we all knew was the single most common bug: null reference exception
Well yes, I'm sure you have, but were those replaced by other bugs, leaving the bug count the same?
No
Well yes, I'm sure you have, but were those replaced by other bugs, leaving the bug count the same?
Anecdotally I've noticed a reduction in these kinds of issues when using languages that use non-nullable references by default (F#. Haskell, etc.). I find I am much more confident as a programmer when nullable references aren't the default. Actually a few days ago we had our first null reference error in F#, and it was because the record type passed to an F# function was instantiated in C#.
If you think about it, the idea that a statically typed system lies to you about the contract that a value will honour is always going to be a source of bugs. It takes static languages back into the realm of dynamic languages.
[1] https://en.wikipedia.org/wiki/Cyclomatic_complexity