I have a few issues with Python. One of which is the unit-testing mantra. I’m a big fan of unit testing, however I don’t see how it can take the place of static type checking. It can supplement static type checking, but not replace it. For example:
File “/home/balor/tmp/revisor/revisor/base.py”, line 1410, in buildInstallationMedia
AttributeError: RevisorBase instance has no attribute ‘mode’
The above would never occur in a statically typed languages such as Java. The Java compiler would simply tell the developer at compile time that RevisorBase has no mode attribute. Unfortunately, this application takes about 20 minutes before it hits the offending line. So what would be a quick spin in a compiler in a staticly typed language is a 20 minute run in Python. It’s also a 20 minute delta between testing patches If I write a change it takes 20 minutes before I see if the change is effective.
I understand that one can get similar runtime bugs in statically typed language, however I’ve seen several instances of this type of issue in Python which would be solved by the simple application of a statically typed language.
Anyway, why should I, the user, see this issue.