3 ms·
> The thing is type hints in Python are less a code quality feature and more a quality of life feature for developers. They are absolutely a code quality featu
by dragonwriter 4y ago
> The thing is type hints in Python are less a code quality feature and more a quality of life feature for developers.
They are absolutely a code quality feature.
> As long as I've got descriptive argument names and docstrings I can just tell you how to use a method.
Yes, you can, but that doesn’t seem to be germane to the argument, since “it is possible to communicate intended use without typing” doesn’t support your QoL vs. code quality argument.
With typing, the type-checker can statically find potential errors in your description, or in my attempt to follow it—that’s a code quality feature. (Of course, that it does provide a description, and a better chance that the description is correct, is also a QoL issue.)
- giantrobot 4y ago> Yes, you can, but that doesn’t seem to be germane to the argument, since “it is possible to communicate intended use without typing” doesn’t support your QoL vs. code quality argument. Jillions of lines of quality Python were written before type hints. They're not strictly necessary for writing quality code. If you find modern code that's high quality it probably uses type hints but type hints don't automatically make high quality code.