5 ms·
> I've been using type hints heavily and it's been such a great help in avoiding bugs and also faster completion in IDEs Agreed. I've been using type hints for
by mrtranscendence 4y ago
> I've been using type hints heavily and it's been such a great help in avoiding bugs and also faster completion in IDEs
Agreed. I've been using type hints for the past few years now even though most of my projects are fairly small (< 10,000 LOC). I wouldn't say they've prevented a huge amount of bugs, but they've definitely prevented a few, and I think they've helped in library design and documentation.
- giantrobot 4y agoType hints are great at helping understand intent. A lot of bugs happen from understanding a code signature but not understanding intent. In a language like Python where types are all loosey goosey it's easy to write subtle bugs by misunderstanding intent.