dynamic typing questions

Daniel Ehrenberg LittleDanEhren at yahoo.com
Fri Dec 19 17:43:10 EST 2003


Jason Tesser <tesserfamily at yahoo.com> wrote in message news:<mailman.352.1071846222.9307.python-list at python.org>...
> 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.

Dynamic typing is usually considered an *advantage* of Python, not a
disadvantage. Usually, if you're keeping track of what the variables
mean, you can use them usefully without errors. The thing about
dynamic typing is that functions are more flexible, making something
that would cause an error in Java not cause one in Python. So even if
the error would be caught in Java, it would run fine in Python. the
distinction between certain types (such as number types) is weak in
Python, making everything more flexible, but it is still strongly
typed where appropriate (eg. numbers and strings). If you still need
something to make sure types are used correctly, try PyChecker.
Sometimes (rarely), it gives an error for type use when it would run
well, but it catches everything.

Daniel Ehrenberg




More information about the Python-list mailing list