type checking

Miki Tebeka mikit at zoran.co.il
Sun Oct 12 04:31:53 EDT 2003


Hello sashan,

> I'm a Python newbie. I have been using c++ for 5 years and before that I 
>   was programming in Pascal. The one thing that annoys me about python 
> is dynamic typing because I find myself making typographical errors of 
> the sort that would under C++ be picked up by the compiler at compiler 
> time.  With Python I have to wait for the error to appear at runtime in 
> order for me to correct it. I find this inefficient. Any advice about 
> how to get around this would be appreciated.

I'll think you'll find dynamic typing saving you time. See
http://www.mindview.net/WebLog/log-0025 for more details.

pychecker does dome checking, but it can't find all the errors that a
statically typed language compiler will find.

IMO the best practice in dynamically typed language is to spend some
of the time you've saved on writing an extensive testing framework.
This will catch much more bugs (including logical ones) that no
compiler will ever catch. See PyUnit for a good framework.

HTH.
Miki




More information about the Python-list mailing list