dynamic typing questions

JCM joshway_without_spam at myway.com
Fri Dec 19 11:43:22 EST 2003


Jason Tesser <tesserfamily at yahoo.com> wrote:
...
> 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.  

I come from a mixed background and have worked on projects in both
statically and dynamically-typed languages.  My only strong advice is
to avoid weakly-typed languages like C, so it's good to not hear you
asking about that one :)

It's true some errors which could have been caught at compile-time by
statically typed languages will not be caught until runtime in Python.
But the decreased development time you'll enjoy partly makes up for
this.  To fully make up for it I suggest (as I'm sure will others)
robust unit-testing.  Also, adding an occasional "assert type(x) ==
expected_type" might be helpful.




More information about the Python-list mailing list