3 ms·
I'm not sure I'm following your comment correctly, but you seem to be implying that adding type hints in Python results in some lost productivity? If so, I wou
by saila 4y ago
I'm not sure I'm following your comment correctly, but you seem to be implying that adding type hints in Python results in some lost productivity?
If so, I would counter that adding types isn't particularly onerous and adds very little overhead to development time, and over time they'll tend to increase your productivity since you'll make less errors, IDEs can give you better hints, etc.
As to the percent of Python developers who use types / type checking, it seems to me that's been changing somewhat rapidly over the past few years. It's certainly greater than 1%.
- tezzy 4y agoI disagree, dependencies can change causing types to change which requires you to alter hundreds of lines across multiple repos. Each new line or character is a line to maintain, there is a cost associated with that. Tests have costs but are extremely valuable, they are a no brainer to me, types are way less obvious. I have spent a lot of time maintaining python types. I have no idea how many bugs it has prevented. I am not sure it is a large number. I know there have been bugs in types, bugs in mypy and dependency changes which created work which only existed because types were in place. There have definitely been days worth of types maintain. There are the extra type imports, extra time to run tests and integration tests etc. It is not as straightforward as you might initially assume.
- bayesian_horse 4y agoI did not say type hints damaged productivity. There is no evidence to point either way, actually. Gradual typing is based on effort. Most people won't spend the effort. And they don't need to, most of the time, either.