Epiphany

I just fully realized something that's been rattling around in my head for a while. Static typing in OO languages isn't the solution to software complexity, rather it's an enabler of it. Static typing is like giving a drunk a bunch of breath mints and saying "Don't drive drunk. But if you must, use these breath mints in case you get pulled over."

The problem is static typing tends to encourage large, complex framework-like interfaces, instead of the decoupled, modular interfaces everyone desires. The irony is, if your interfaces are small and simple, then static typing offers you very little benefit. Static typing works best when there is lots of complexity, but like breath mints for a drunk, we are just making it easier to get away with what we know to be a mistake anyway.

Posted June 10, 2008 7:06 PM