On Sunday, 28 January 2018 at 00:31:18 UTC, rjframe wrote:
On Sat, 27 Jan 2018 22:59:17 +0000, Ola Fosheim Grostad wrote:
On Saturday, 27 January 2018 at 13:56:35 UTC, rjframe wrote:
If you use an IDE or analysis/lint tool, you'll get type
checking. The interpreter will happily ignore those
annotations.
You need to use a type checker to get type checking... No
surprise there, but without standard type annotations the type
checker isn't all that useful. Only in past few years have
typing stubs become available for libraries, and that makes a
difference,
My point is that the interpreter ignores information that I
give it, when that information clearly proves that I have a
bug. Python 3.6 gives you an explicit type system when you
want/need it, but stops just short of making it actually useful
without secondary tools.
The reference interpreter doesn't make much use of static type
information. I think it makes sense to have separate type
checkers until this new aspect of Python has reached maturity.
That doesn't prevent third parties to implement interpreters that
makes use of type information.
Professionals won't shy away from using additional tools anyway,
so the only reason to build it into the interpreter is for
optimization at this point.