Hacker News new | ask | show | jobs
by mcguire 3800 days ago
What does mypy do if you make a call from code with type annotations into code without? Or vice-versa?

Has anyone ever gotten paid to add annotations to code that works?

Personally, I view type systems as like a safety line when doing work on a roof, and optional typing as having a line that might or might not be tied off.

1 comments

> What does mypy do if you make a call from code with type annotations into code without? Or vice-versa?

It's not able to analyze across such boundaries, but as you expand the set of typed code you get better and better coverage.

> Has anyone ever gotten paid to add annotations to code that works?

At Dropbox, we're starting to add type annotations to code. We're confident it will catch many bugs at lint time. Source: I work at Dropbox.

> Personally, I view type systems as like a safety line when doing work on a roof, and optional typing as having a line that might or might not be tied off.

At least it has the possibility of being tied off and catching you. Better than definitely not having a line.

Are you also using property based testing?