<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 13, 2014 at 3:14 PM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am proposing that we adopt whatever mypy uses here, keeping discussion of the details (mostly) out of the PEP. The goal  is to make it possible to add type checking annotations to 3rd party modules (and even to the stdlib) while allowing unaltered execution of the program by the (unmodified) Python 3.5 interpreter.</blockquote>

</div><br></div><div class="gmail_extra">To the bottom of things...<br><br></div><div class="gmail_extra">About the second time I wrote about Python ("Why not Python", 2007) I dismissed it as serious software development environment because the lack of static type checking hindered the creation of proper software development environments.<br>

<br><div style="margin-left:40px"><a href="http://blog.neogeny.org/why-not-python.html">http://blog.neogeny.org/why-not-python.html</a><br></div></div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra">

So, Why do I now have doubts about adding support for static type checking?<br><br></div><div class="gmail_extra">I've been programming in almost-only Python for several years now, and this discussion had me think hard about "Why?".<br>

<br>The answer is simple: I never was as productive as I've been since I've centered on Python.<br><br></div><div class="gmail_extra">But, again Why? <br><br>Despite what my '07 article says, the IDE I use is pythonized-VIM and the command line. Where does the productivity come from? <br>

<ol><li>Readability with the right amount of succinctness. Python programs are very small, but understandable.<br></li><li>The breadth and design consistency of the standard library. Some 70%? of what I need is there, and the design consistency makes it easy (intiutive) to use.</li>

<li>PyPi covers another 28%.</li><li>The Zen of Python (import this) permeates all of the above, including most third-party packages. The ecosystem is consistent too. It's a culture.<br></li></ol><p>What do I fear? I think it is that Python be transformed into a programming language different from the one that now makes me so productive.</p>

<p>I studied Ruby, and I don't like it. I've been studying Go, and I don't like it. One must like the concepts and the power, sure, but the syntax required for some day-to-day stuff stinks like trouble;  simple stuff is so complicated to express and so easy to get wrong...<br>

</p><p>I hate "List[str]" and "Dict[str:int]". Where did those come from? Shouldn't they (as others have proposed) be "[str]" and "{str:int}"? What about tuples?</p>Why not write a similar, but different programming language that targets the Cython runtime and includes all the desired features? <br>

<br>All said, this is my proposal.<br><p>The PSF could support (even fund) MyPy and similar projects, promoting their maturity and their convergence. The changes in 3.5 would be limited but enough to enable those efforts, and those of the several IDE tool-smiths (changes in annotations, and maybe in ABCs). Basically, treat MyPy as PyPy or NumPy (which got '::'). It's in Python's history to enable third-party developments and then adopt what's mature or become the de-facto standard.<br>

</p></div><div class="gmail_extra">Then, on a separate line of work, it would be good to think about how to enable different programming languages to target the CPython environment (because of #2, #3, and #4 above), maybe by improving AST creation and AST-to-bytecode? There could be other languages targeting the CPython runtime, which is the relationship that Scala, Jython, IronPython, and others have to their own runtimes. <br>

<br></div><div class="gmail_extra">-1 for standardizing static type checking in 3.5<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,<br></div><div class="gmail_extra"><br>-- <br><span style="color:rgb(0,102,0)">Juancarlo </span><b style="color:rgb(0,102,0)">Añez</b>
</div></div>