Adding static typing to Python

Michael Chermside mcherm at
Tue Feb 19 09:47:17 EST 2002

No discussion of adding static typing to Python would be complete 
without a reference to Guido's thoughts on the subject:

I suspect that these may be a bit dated (~2 yrs old), but a few key 
ideas should still be relevent:

    * Static typing should be optional.
    * The 'purpose' of static typing is to ensure that type errors are
      caught at compile time, not runtime (in checked code).
    * Don't expect huge performance gains -- catching certain kinds of
      errors earlier is the main gain.

Not that I fully agree, or want to tie Guido to old ideas, but those who 
come to this idea fresh should realize it has been considered before. 
The main results of the previous consideration are:

    * Performance isn't really the issue (though people often think it
    * Unit testing could (if used well) catch the same errors that static
      type checking catches.
    * Unit testing is a good thing.
    * Python is a REALLY dynamic language, and one which tends to trust
      the programmer.

-- Michael Chermside

More information about the Python-list mailing list