Guido Contemplates Adding Optional Static Typing to Python

::: {.Section1}

Optional static typing has long been requested as a Python feature. It's been studied in depth before (e.g. on the type-sig) but has proven too hard for even a PEP to appear. In this post I'm putting together my latest thoughts on some issues, without necessarily hoping to solve all problems. [via]{style="font-style:italic"} [Artima Weblogs]

Even though I’m a big explicit typing proponent, I don’t like the idea of optional explicit typing. Visual Basic has this and I don’t think it’s a great success. People don’t code implicitly until their projects hit 1,000 lines and then say “Well, it’s getting a little obscure, let’s turn on explicit.” They either go with implicit until the project is so incomprehensible that even the original coder has a hard-time making things explicit, or they go explicit from scratch. I think one’s attitude towards implicit/explicit typing is part of what you bring to language choice – I’ll turn to Python when I want implicit, I’ll turn to C-derived languages when I want explicit. :::