2 ms·
To me the biggest benefit of static types, type hints, annotations, etc. is their documentation value. I don't have a particularly strong opinion on the issue o
by danaliv 8y ago
To me the biggest benefit of static types, type hints, annotations, etc. is their documentation value. I don't have a particularly strong opinion on the issue of static typing generally, but if you don't use types, you damn well better document what your functions expect to receive and what they produce.
It is so frustrating to jump into a codebase and have to read every single line to figure out what the inputs and outputs are. Think about how much time is wasted. It's like an anti-multiplier. One engineer decides they don't want to take a few minutes to annotate types or write a comment, and now every other engineer on the team has to waste time figuring out what's happening. It makes me want to scream.