Adding static typing to Python

brueckd at tbye.com brueckd at tbye.com
Tue Feb 19 10:39:24 EST 2002


On Tue, 19 Feb 2002, Michael Chermside wrote:

> No discussion of adding static typing to Python would be complete
> without a reference to Guido's thoughts on the subject:
>
>     http://www.python.org/~guido/static-typing/index.htm

Thanks for the link. Reading it makes me wonder if some sort of partial
static typing would be beneficial, e.g. if the compiler was able to
determine up front that X is an atomic numerical type (int, long, or
float), Y is a string type (string or unicode), Z is a simple container
type (list, tuple, dict), and W is a user-defined object. Just thinking
out loud, and I don't know if it would help or not, but maybe instead of a
full static type system you could get many of the same benefits by
classifying objects into some broad categories, defaulting to the
classification of a generic Python object if unsure. Any thoughts?

-Dave





More information about the Python-list mailing list