Hacker News new | ask | show | jobs
by bow_ 2251 days ago
Type hints are machine-checkable documentation, similar to doctests in my view.

Since I started using them, the number of runtime errors coming out from my own code has been drastically reduced.

Of course one can always go overboard with those `Generic[T]` hints. Though this is a problem of the tool user, not the tool.