|
|
|
|
|
by berkes
1000 days ago
|
|
I dare you to have a look at your rollbar, sentry or other exception logging of a rails project. And I'll put money on it, that the top 5 exceptions has several 'undefined method x' (probably on nil) errors. Those warrant unit tests. Those will regress. Those would never exist in a strongly typed language (though Java still has null...ugh) |
|
It's true that 99.9% of production log errors are NoMethodError exceptions.
annnnnd 99.9% of those NoMethodErrors are just code not handling nils/nulls correctly
annnnnd 99.9% of those unhandled runtime nils/nulls are from external data (user inputs, database data, etc)
So strong typing doesn't help you there at runtime, it just blows up differently.