An unspeakable act

Jeff Koftinoff jeffk at jdkoftinoff.com
Fri Jul 13 01:48:17 EDT 2001


Daniel Klein wrote:

> I did the unspeakable and got into a discussion (with another person on another usenet group) on
> Python vs Java. This person says that dynamically typed languages produce bug-ridden programs and
> that there are no reliable large applications (especially network apps) written in Python and that
> it is just used for small to medium scripting. I know better but I don't have any proof. Can anyone
> point me at a list of companies and the applications they have written (I already know about Zope
> and I can't find the list of companies on the Python website since they moved the page to PSA).
>
> Thanks for any information you can provide (or point me to).
>
> Daniel Klein

I used to think the same things with regards to dynamically typed languges versus statically type
languages.  The initial idea is that statically typed languages will tell you about the type errors
when it compiles.

Well, there is a bigger conceptual problem with the whole argument.  My new realization is that
unfortunately most C++ programmers have an attitude that if the program compiles and seems to work it
is done! (it compiled! ship it!) - real testing of objects is rarely seen.

How do you know your code is correct? You HAVE to test each part anyways.  People who say 'statically
typed languages are safer' must be relying on the compiler to tell them if their code is correct
without fully testing their code!  Yes, the compiler will complain if there is a type mismatch, but it
won't tell you that the body of your function is doing the correct job as the specification says! heh,
most c++ programmers don't even properly SPECIFY what each function/method is supposed to do.

So, you have to properly test your code anyways to make sure it is robust.  Any type errors in python
code would be caught then.  For people who do not make proper test code for their C++ objects, you
will find that the bugs in their code are MUCH more insideous than a type error.  And they creep in
EVERYWHERE.  So I would be inclined to say that static typing just gives you a false sense of security
and makes it easier to overlook proper testing.  For people who actually DO full testing on their C++
objects, I would be inclined to say that the static typing rules just make the code more complex.


Have fun

jeff koftinoff
jeffk at jdkoftinoff.com





More information about the Python-list mailing list