not safe at all

Quinn Dunkan quinn at yak.ugcs.caltech.edu
Fri Jul 13 15:12:51 EDT 2001


On Fri, 13 Jul 2001 16:00:22 GMT, Dennis Roark <denro at earthlink.net> wrote:
>I appreciate those who replied, particularly Nick's
>informative reply.  I would still argue that "dynamic"
>typing is a weaker and less safe sort of typing than the

That's always a popular argument, naturally from people who have never written
a large program in a dynamic language.  The argument is "which method produces
'more correct' programs?".

The static people talk about rigorously enforced interfaces, correctness
proofs, contracts, etc.  The dynamic people talk about rigorously enforced
testing and say that types only catch a small portion of possible errors.  The
static people retort that they don't trust tests to cover everything or not
have bugs and why write tests for stuff the compiler should test for you, so
you shouldn't rely on *only* tests, and besides static types don't catch a
small portion, but a large portion of errors.  The dynamic people say no
program or test is perfect and static typing is not worth the cost in language
complexity and design difficulty for the gain in eliminating a few tests that
would have been easy to write anyway, since static types catch a small portion
of errors, not a large portion.  The static people say static types don't add
that much language complexity, and it's not design "difficulty" but an
essential part of the process, and they catch a large portion, not a small
portion.  The dynamic people say they add enormous complexity, and they catch
a small portion, and point out that the static people have bad breath.  The
static people assert that the dynamic people must be too stupid to cope with a
real language and rigorous requirements, and are ugly besides.

This is when both sides start throwing rocks.

>typing is a weaker and less safe sort of typing than the
>static typing of C++.  Nick brings up the C++ example of

But if all you know is the C idea of "static typing" and "type safety" you
don't even know your own camp.  To view this debate in earnest, go to wherever
the Eiffel and Ada people do battle against Smalltalkers, Lispers, & co.

There's good arguments on both sides.  I've never seen a formal study, but
even if there is one it probably wouldn't be difficult for either side to poke
holes in it.



More information about the Python-list mailing list