On 7 September 2016 at 10:28, Hugh Fisher <hugo.fisher@gmail.com> wrote:
Firstly, the interpreter will need to have type checking built in. Just about every intro book and tutorial for Python says how great it is that you don't have an edit-save-compile cycle, just fire up the Python interpreter and start typing. Having to run a separate type checker will be considered as ridiculous as a C compiler that didn't run the preprocessor itself.
The intention (and current reality) is that type checkers are *static* checkers, not runtime checks, in the same way as linters like pyflakes. So yo run a checker over your code as a QA step as part of your testing cycle, it has no runtime effect. So your users and dependencies are unaffected by your choice of typechecker. Frankly, this is the only model that makes sense, precisely because of the issues you raise. And it's an existing model used by linters like pyflakes, so there's no reason to assume it will be any less acceptable for type checkers. Hope this clarifies the situation. Paul