3 ms·
It's useful to keep these anyway, as if you make a change that accidentally changes the type of some function, the error message makes it immediately obvious wh
by daxfohl 3y ago
It's useful to keep these anyway, as if you make a change that accidentally changes the type of some function, the error message makes it immediately obvious what you did. Otherwise it's hard to tell whether you messed up the function or the caller.
Also having type annotations makes code reviews easier. Basically people's brains can use the same optimization that compilers do.
- piaste 3y agoThere is also a helpful compiler command to generate updated signature files for you. Then you just glance at the git changes and see if you accidentally broke an API or not.
- Smaug123 3y agoMay I plug https://github.com/G-Research/ApiSurface/ https://github.com/G-Research/ApiSurface/ ? It ensures this as part of your testing pipeline, and requires an appropriate minor or major SemVer bump if you alter the API in a non-breaking or breaking way.