Preferences

It sounded to me like they agree with you -- type hints are valuable -- just with the caveat that satisfying the tooling around them is a waste of time when most of the benefits can be had with minimal effort writing type hints explicitly for the consumption of other developers.

E.g., when I write numerical python code I'll often just use a string like `"(n_items, n_dims)"` as the type hint, or if the only salient detail of a signature is that some dimensions match I might even write something as simple as `foo(bar: "(a, b)", baz: "(b, c)")`. Ofttimes that's the only data a developer really cares about in that programming context, so a more complete type hint (one designed for mypy and the rest of the tooling) would just take longer to read and understand.


exactly! What I meant is that returns on mypy compliance investments are extremely poor. For most projects it makes no sense to invest so much time playing this "hack this hint" games but for big projects every single digit% improvement counts.

Most projects don't need it and I can't help but facepalm when I see small projects have half of their commits describing typing compliance battles just because mypy came with "yet another python project boilerplate" or pressure from the industry.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal