Adding static typing to Python

Alexander Jerusalem ajeru at vknn.org
Wed Feb 20 16:10:04 EST 2002


> > You argue that there are cases where static typing gets in your way,
> > where it makes programs less flexible.
> 
> Well, not quite.  I argue that assigning types to even trivial Python
> programs is a delicate and tricky business, and that the static types
> implicit in a typical Python function are tremendously complex.
> 
> This _isn't_ an argument against optional static types for Python: I
> believe in them too.  This is just an explanation of why they haven't
> been done _yet_:
>     1) Typical type declarations for Python will be more complex than
>         those of most other popular languages.
>     2) Therefore, type inference is almost certainly necessary.
>     3) Because of 1 and 2, optional static typing for Python will 
>         involve a lot of work. :)
> 
> Of course, this isn't to say that it won't or shouldn't get done: just
> that the cost portion of the cost/benefit here is very high---and the
> free time among the people who know enough about Python in particular
> and type systems in general is quite low.
> 
> Of-course-I'd-love-to-be-proven-wrong-ly yrs,

I'm afraid you won't be proven wrong very soon. The types-SIG doesn't
seem to be very alive. The papers are rather old and the mailing list
archives don't contain much for the recent months.

Alexander



More information about the Python-list mailing list