Re: [Python-ideas] [Python-Dev] What should a good type checker do? (was: Please reject or postpone PEP 526)

Please respect Reply-To, set to python-ideas. Greg Ewing writes:
But "forcing" won't happen. Just ignore the warning. *All* such Python programs will continue to run (or crash) exactly as if the type declarations weren't there. If you don't like the warning, either don't run the typechecker, or change your code to placate it. But allowing escapes from a typechecker means allowing escapes. All of them, not just the ones you or I have preapproved. I want my typechecker to be paranoid, and loud about it. That doesn't mean I would never use a type like "Floatable" (ie, any type subject to implicit conversion to float). But in the original example, I would probably placate the typechecker. YMMV, of course.

What's up with the weird subthreads, Stephen?! On Guido's suggestion, I'm working on posting those type-checking thoughts here. -- Koos On Sat, Sep 3, 2016 at 6:17 PM, Stephen J. Turnbull <turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
-- + Koos Zevenhoven + http://twitter.com/k7hoven +

On Sat, Sep 3, 2016 at 6:44 PM, Koos Zevenhoven <k7hoven@gmail.com> wrote:
On Guido's suggestion, I'm working on posting those type-checking thoughts here.
Except that I just realized I can still make it to the store before it closes, so a little later. But anyone can read my posts on python-dev from yesterday in the meantime if they want to. -- Koos PS. I think I just got reminded about what I disklike most about these lists.

Koos Zevenhoven writes:
What's up with the weird subthreads, Stephen?!
Moving to Python-ideas? Doing what should have been done earlier, and which Guido explicitly requested. If you're referring to the cross-post to python-dev, I was hoping to encourage motion of the thread by setting reply-to and saying so. Evidently that traditional practice is a mistake on Python channels, as it won't be respected or even noticed.

Stephen J. Turnbull wrote:
But "forcing" won't happen. Just ignore the warning.
If I'm using a static type checker at all, I'm going to be treating its warnings as errors and doing something to make them go away. So effectively it would force me to deal explicitly with every instance of int-float mixing. I wouldn't enjoy doing that. -- Greg

What's up with the weird subthreads, Stephen?! On Guido's suggestion, I'm working on posting those type-checking thoughts here. -- Koos On Sat, Sep 3, 2016 at 6:17 PM, Stephen J. Turnbull <turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
-- + Koos Zevenhoven + http://twitter.com/k7hoven +

On Sat, Sep 3, 2016 at 6:44 PM, Koos Zevenhoven <k7hoven@gmail.com> wrote:
On Guido's suggestion, I'm working on posting those type-checking thoughts here.
Except that I just realized I can still make it to the store before it closes, so a little later. But anyone can read my posts on python-dev from yesterday in the meantime if they want to. -- Koos PS. I think I just got reminded about what I disklike most about these lists.

Koos Zevenhoven writes:
What's up with the weird subthreads, Stephen?!
Moving to Python-ideas? Doing what should have been done earlier, and which Guido explicitly requested. If you're referring to the cross-post to python-dev, I was hoping to encourage motion of the thread by setting reply-to and saying so. Evidently that traditional practice is a mistake on Python channels, as it won't be respected or even noticed.

Stephen J. Turnbull wrote:
But "forcing" won't happen. Just ignore the warning.
If I'm using a static type checker at all, I'm going to be treating its warnings as errors and doing something to make them go away. So effectively it would force me to deal explicitly with every instance of int-float mixing. I wouldn't enjoy doing that. -- Greg
participants (3)
-
Greg Ewing
-
Koos Zevenhoven
-
Stephen J. Turnbull