Python for air traffic control?
rnd at onego.ru
Thu Jul 5 11:47:37 CEST 2001
On 5 Jul 2001, Russ wrote:
>> There are studies that indicate that productivity in strongly typed
>> languages is higher (2:1 in one study I read - unfortunately, they are
>> "thin" on the ground because you need two identical ability teams doing the
>> same application in two different languages to get meaningful comparisions -
>> but it has been done and that was the result) than loosely typed languages.
>Let's cut right to the chase here. I like strong typing almost as much
>as you do, but I don't understand why I can't get it in Python,
>perhaps by specialized code-analysis tools. Is the problem just that
>the development tools are underdeveloped, or is there a fundamental
>technical reason that type-checking cannot be done? If it's the
>former, then I suggest that the tools be given a very high priority.
What for? Python has dynamic type-checking and making yet another Pascal
from it is probably stupid idea.
>If it's the latter, then perhaps type checking can be done under
>certain reasonable restrictions. Whatever the case, I want to have my
>cake and eat it too. :-)
You can add asserts to whatever places to check types:
from types import *
def add_int(x, y):
assert type(x) is IntType and type(y) is IntType
I can't see how static type-checking could eliminate more
problems than create, though.
Sincerely yours, Roman Suzi
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Thursday, July 05, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ ">From the Department of Redundancy Dept." _/
More information about the Python-list