dynamic typing question
noemail at noemail4u.com
Mon Dec 22 14:23:55 CET 2003
On Fri, 19 Dec 2003 08:28:58 -0600, "Jason Tesser" <JTesser at nbbc.edu>
>I work for at a college where I am one of 2 full-time developers and we are looking to program a new
>software package fro the campus. This is a huge project as it will include everything from registration to
>business office. We are considering useing Java or Python. I for one don't like Java because I feel the
>GUI is clunky. I also think that we could produce quality programs faster in Python.
>The other programmer here is very concerned about dynamic typing though in Python. He feels like this
>would be too much of a hinderance on us and too easy for us to make a mistake and not catch it until
>runtime making debugging harder.
>OK what are your guys thoughts here? How have you all overcome the lack of static typing? Is Python a
>bad decision here? By the way we will be using Postgres in the back if that matters to anyone.
The point of 'interfaces' in Java is to support something like
dynamic typing. In Python, as with Java interfaces, you don't care
what an object *is*, only what it *does*.
Also, there are external programs (pychecker
(href="http://freshmeat.net/projects/pychecker") and pylint
(href="http://freshmeat.net/projects/pylint") that perform many of the
checks that you would get with a statically-typed language.
Finally, the standard Python distribution includes PyUnit for
developing unit tests, following the same principles as JUnit, et al.
If you create unit tests, you should be able to find run-time problems
pretty quickly. I'd recommend avoiding tests that make sure the
caller is passing the right "type" of object, though. If the test
crashes because the arguments can't *do* the thing the test requires,
either the test or the caller is wrong. Either way, you've found a
More information about the Python-list