[Python-ideas] Typecheckers: there can be only one

Hugh Fisher hugo.fisher at gmail.com
Wed Sep 7 05:28:30 EDT 2016


There's been discussion here and on python-dev regarding PEP 526 that
assumes there will be multiple type checkers for Python. I really
can't see this happening. If typing annotations become common or maybe
considered best practice, the Zen of Python "there should be one-- and
preferably only one --obvious way to do it" will take effect.

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.

Secondly, PyPI will collapse if there isn't just one. How can we
express dependencies between packages that use different type
checkers? When type checkers themselves have versions? When a dev team
uses one type checker for 1.x and then switches to another for 2.x?
That's a special circle of hell.


-- 

        cheers,
        Hugh Fisher


More information about the Python-ideas mailing list