Flying With Python (Strong versus Weak Typing)

Donn Cave donn at drizzle.com
Tue Mar 11 11:03:10 EST 2003


Quoth Alex Martelli <aleax at aleax.it>:
...
| Static typing makes it easier for the compiler to generate fast
| code, and (depending also on other issues) may slightly enhance
| programmer productivity by catching a small percentage of errors
| a bit earlier than testing would catch them -- that's all.  It has
| no real bearing on safety issues for life-critical software.

I think this is the most generous posture I've seen you take on
this issue, so I should probably leave well enough alone, but ...

This seems to be a matter of one's faith in some set of techniques
that an engineering team can use to write correct software.  The
Python world seems to place a great deal of faith in testing.
Statically typed languages can test, too, so the bottom line must
be whether testing is such a perfect solution that anything else -
like computer analysis of the program for structural correctness -
is irrelevant.  Interesting question.  I don't understand testing,
to me it seems highly vulnerable to human weaknesses like making
invalid assumptions, and it seems vulnerable to inaccuracies in
the simulation of the program's intended environment.

I have a vague impression that Ada is commonly specified for work
in this area, but I don't know that language, and perhaps not a
lot of others here do either since we regularly see C++ cited as
the example of a statically typed language.  That's unfortunate,
since its type system is clumsy and ineffective.  ML would probably
be a better example of a powerful static type system.

	Donn Cave, donn at drizzle.com




More information about the Python-list mailing list