Typing system vs. Java

Donn Cave donn at drizzle.com
Wed Aug 1 00:56:10 EDT 2001


Quoth <brueckd at tbye.com>:
...
| And those benefits are? I'm still waiting for anyone to be specific about
| these benefits. Someone finally brought up the
| semi-automatic-integer-to-float promotion problem and maybe the potential
| for some modest performance gains (thank you!), but that's about it. Each
| person has to judge the costs vs benefits, but that seems like a pretty
| paltry list of "plusses".

You couldn't have expected to get a long list of horror stories that
would stand your hair on end and send you off to the nearest strongly
typed language's site.  Most of us aren't chafing under the excessive
freedom of Python, it works for us just like as it does for you, or
we wouldn't be here.

But the observer is part of the equation.  Maybe our colleagues are
sick and tired of our Python programs blowing up all the time with
run time errors, and you should have asked _them_ to post examples
to c.l.p.

Anyway, it's all about errors, right?  Does this cover it -?

 -  I don't make all that many errors.
 -  I make errors, but I can fix them whenever they turn up.
 -  I catch errors with run time tests.
 -  I catch errors with compiler tools.
 -  I need to catch more errors than I currently do.

Most of us probably hit every one to some degree.  I think the point
may be, suppose you need to catch more errors than you currently do.
Maybe you perceive this after deploying your software, or maybe your
next project calls for exceptionally high standards of reliability.

So for sure, you need to step up the run time tests, but is that
enough?  It's really hard to test _everything_ - I don't know,
take exception handling, typically involves the exception data
and that data isn't very well formed.  Like socket errors that
usually have two args but once in a while only one.

Type checking would catch some of that, stuff you could have missed
otherwise.  It sure could be overrated, and especially when (as usual)
not well designed and integrated in the language, but that would be
like saying OOP is a dud - after evaluating it in C++.

On a different note, explicit type annotations arguably make a program
easier to understand.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list