
Swift’s Overly Strict Type Checking Made My App Crash in Production - kartickv
https://medium.com/@karti/swifts-overly-type-checking-made-my-app-crash-in-production-3f5df0981c20
======
makecheck
The code snippet in this rant makes it pretty clear that it was programmer
error. You took an obviously-optional value, forced-unwrapped it with no
checking at all, then blame the _language_ for this!?

~~~
kartickv
I knew it wouldn't be long before someone dismissed it as programmer error.
But that's the whole promise of static typing — preventing programmer errors
from causing runtime crashes. In this case, static typing failed at its task.

~~~
makecheck
No. "Static typing" means that the runtime type is known at compile time, and
it _was_ known: it was presented as being either a valid object or nil. The
behavior was consistent with the two possibilities that were "promised" by the
compiler.

When your program overrides with "!", you are disabling the language's
protections. You really can't blame the type system for failing to complain
about something that you told it not to check!

