Flying With Python (Strong versus Weak Typing)

Alex Martelli aleax at aleax.it
Tue Mar 11 04:51:09 EST 2003


<posted & mailed>

Hasoob  ahs wrote:

> In an interview at http://www.artima.com/intv/strongweak4.html Guido
> van Rossum was asked if "he would be comfortable enough with the
> robustness of Python systems to fly on an airplane in which ALL the
> control software was written in Python". Guido's answer was clear but
> I would like to hear from other Python programmers.
> Would you be comfortable?. Your answer may help me decide between
> strong and weak typing. I prefer an answer of yes or no followed by an
> explanation.

Yes!  The issue of what programming language[s] has/have been used
in developing the control software is largely irrelevant to the issue
of system safety, which depends instead on the process used for the
development and the proper mindset on the part of the development team.

If everything hasn't been *thoroughly* tested, AND programmed to be
fail-safe to cover up for testing insufficiencies, the plane is not
safe enough to use -- *whatever* language[s] it's programmed in --
and that should be obvious enough to anybody involved in software
development, that the very question is a joke.

What programming language[s] ever used or dreamed of will ensure
no coder has ever mistakenly typed "a+b" where they meant "a-b",
for example?!  Testing and verification procedures MUST have been
thorough enough to ensure this _has_ become impossible -- for the
engineering meaning of "impossible", of course;-) -- AND there
must be fall-back safe systems that will further ensure against
disaster if the impossible has occurred.  Given this indispensable
process and architecture issue, isn't it obvious that it's totally
irrelevant to the system's overall safety whether the compiler has
performed the further smattering of semantically puny "verifications"
allowed by mandatory-declaration, stating-typing languages?

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.


Alex







More information about the Python-list mailing list