2 ms·
Ignoring runtime bugs, static typing and type hints gives me (a) autocomplete that works better (b) near-real-time linting that lets me catch dumb bloopers befo
by kortex 7y ago
Ignoring runtime bugs, static typing and type hints gives me (a) autocomplete that works better (b) near-real-time linting that lets me catch dumb bloopers before my focus shifts to a different zone (c) lets me inspect objects/signatures and get up to speed on other people's code way faster than having to look up docs.
This alone gives me a huge productivity boost and I can't imagine working without it. It just so happens that anecdotally I see runtime errors inversely frequently to my discipline with using hints (go > python w/ hints > python w/o hints).
I like having some wiggle room for rapidly hacking stuff out. interface{} and Any are nice in small doses. Namely as parameter types and only when I'm the only one using the code and just need to ducktype my way through something.