News for hackers. Stuff that matters.
Re:Python’s “type hints” are a bit of a disappointment to me by saila on Friday April 22, 2022 @12:48PM (#31124180)
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%.

Re:Python’s “type hints” are a bit of a disappointment to me by tezzy on Tuesday April 26, 2022 @06:10PM (#31173791)
I 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.

Re:Python’s “type hints” are a bit of a disappointment to me by bayesian_horse on Saturday April 23, 2022 @12:37AM (#31131447)
I 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.