Type Annotations Debate
Discussions center on the value of type annotations in programming, particularly their role as reliable documentation, benefits for code readability in large dynamically-typed codebases, and comparisons to comments or inferred types.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Types are documentation, very useful in large dynamically- typed code bases.
Without types, how do you know you're not writing nonsense?
You can't really on type annotations to help interpret the code.
Comments have the potential to get forgotten and become incorrect. Type annotations not.
Type decorations without the performace benefit feels stupid. Types can be inferred for static analysis tools.
I can't answer what you're missing as I'm missing it too. Type annotations have seemed to me as useful documentation. If they're strictly enforced, it might make it easier for a new coder to interface with unfamiliar code...but if it was designed well in the first place, duck typing should handle it and raise exceptions as appropriate.
Do you... have type annotations? I think you might be missing the point.
What's the point of typing things if you have to constantly typecheck them anyway?
Types don’t explain intent or gotchas. They’re also useful, but you need both.
Type annotations by themselves, are little more than a comment