Python for air traffic control?

Russ 18k11tm001 at sneakemail.com
Tue Jul 3 14:40:31 EDT 2001


"Peter Milliken" <peter.milliken at gtech.com> wrote in message news:<9hrj3q$cj1 at news1.gtech.com>...
> Funny, I thought all of the April Fool jokes were out on the 1st April, did
> this one get delayed (badly) somewhere along the line?
> 
> Python is a fine language for quick and dirty prototyping. For banging out
> applications that are going to run in an environment where it isn't going to
> matter if the program crashes, but it is certainly not something I would put
> forward for something like Air Traffic Control.
> 
> This is a joke, right?

If that's your idea of a joke, you have a strange sense of humor, but
I appreciate your post anyway. If your claims about Python are even
close to the truth, I need to know.

<cut>

> Based upon Gerrit's observations, which I fully endorse, anybody who doesn't
> use the most strongly typed language they can find for an application like
> Air Traffic Control, has to put it mildly, rocks in their head :-).

As I indicated in my original post, the lack of type checking does
concern me. However, as I wrote in a later post, I also suspect that
this concern is overblown. I am not a computer scientist or even a
full-time programmer, so I don't pretend to be an expert in this area.
I am an aerospace engineer, and I do some programming in support of my
own research (but I am a Python beginner).

Consider the type checking in C or C++, for example. Suppose that a
function takes several ints (or any other type) as arguments, and
suppose the calls of the function all pass ints in the correct slots.
The compiler will be perfectly happy. Does that assure that the
arguments are passed correctly? Of course not. It is a necessary but
not sufficient condition for correctness. The arguments could be
completely out of order, and the compiler wouldn't have a clue.

Now consider argument passing by keyword in Python. The order of the
arguments no longer matters. Sure, the wrong type of arguments could
still be passed in, but it seems to me the probability is less than
getting the wrong object of the right type in C++. In C++, the
complier only checks the type of the argument, but Python checks the
actual NAME of the argument. The name is more specific than the type.

In C++, the function calls all get checked automatically at compile
time, but Python doesn't check them until run time. That is a valid
concern, but hardly a show-stopper. I understand that PyChecker can be
used for static checking. I actually think the core Python language
should have an option to do static checking, but as long as some
product is available to do it, the issue is not major.

> Don't get me wrong, Python is a nice language and you could probably do the
> job with it with enough time and effort. But as an earlier respondent said,
> you would literally have to test it to death and then some! i.e. because of
> the lack of type checking  there could be a single line of code somewhere
> that has never been run that could cause catastrophic failure of the
> application (architectural design *might* mitigate this but it gets back to
> the people factor - something I don't trust :-)). At least with a strongly
> typed language, even if a line of code has never been run, you are
> reasonably assured that when it does run it won't crash due to a variable
> being mispelled or mis-used.

As I said, static type checking is a must, but it can already be done
in Python. So I think your concerns, although valid, are way
overblown. By the way, people in the commercial software industry have
no idea about the amount of testing that will go into the ATC
application we are talking about. Their concerns are completely
different, of course. If they tested their software even one-tenth as
much as this application will be tested, they'd go out of business. I
get a kick out of people who think that a few programmers can hack out
some code and just slap it into an operational ATC system (not to
imply you think that, of course).

> Of course, I could at this point say I would never venture into air space
> controlled by such as system, but I know it would never get off the ground
> (so to speak :-)) because to do it in Python would mean it would never pass
> acceptance testing - sure you could code it just as fast (if not faster)
> than most other languages used for this application area but you would be in
> the test phase forever - or at least until the customer cancelled the
> contract :-). So keep dreaming :-)

You may be right that Python is not the right language, but I don't
think you've made a convincing case.

Russ



More information about the Python-list mailing list