<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 21, 2015 at 4:04 PM, Greg Ewing <span dir="ltr"><<a href="mailto:greg.ewing@canterbury.ac.nz" target="_blank">greg.ewing@canterbury.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 01/22/2015 11:30 AM, Guido van Rossum wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But the static checker is like a linter and it's common to run those<br>
infrequently (e.g. only when submitting a diff for review) while running<br>
unittests frequently (e.g. whenever the developer has written some new code).<br>
Assuming you have fast unittests.<br>
</blockquote>
<br></span>
This still doesn't make sense to me. If your unit tests are any<br>
good, they'll contain tests that use the types you're supposed to<br>
be importing, so they'll fail if you forget to import them.<span class=""><br></span></blockquote><div><br></div><div>Not necessarily. I've seen plenty of code that takes instances a certain class as argument and calls methods of that type but never constructs a new instance nor does any of the other things for which you need the class name, and where the module defining the class is never imported. Such code works fine, but when you want to declare the type you have to import it.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
And, having coded up much of a possible typing.py module already<br>
(<a href="https://github.com/ambv/typehinting/tree/master/prototyping" target="_blank">https://github.com/ambv/<u></u>typehinting/tree/master/<u></u>prototyping</a>) I really don't<br>
see the big problem with run-time evaluation of constraints.<br>
</blockquote>
<br></span>
Well, having to quote forward-referenced types is a fairly big<br>
aesthetic problem for me, even if it's not a practical one. To<br>
my mind it's a worse syntactic hack than '::' would be. But it<br>
seems you're not bothered by it so much.</blockquote></div><br></div><div class="gmail_extra">You can write a lot of code without ever having to use a forward reference. But "::" would have to be used everywhere.<br><br>Or perhaps I value the ability to use this with Python 3.4 more than you do.<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)</div>
</div></div>