Toward a Corpus Study of the Dynamic Gradual Type
summary
Corpus analysis targets 221 mypy-annotated GitHub projects and finds roughly 320,000 any occurrences, then clusters them into eight patterns of use. Several patterns map to concrete fixes: replace ad hoc anys with type variables, use the new Self pattern for instance-returning methods, and prefer indexed or mapping types; some fixes are implemented in mypy while three pattern classes remain hard to detect or auto-fix and tools like monkeytype are proposed.
AI-written summary · about
chapters (6)
- 0:00Gradual typing introduction
- 2:15Dynamic gradual types motivation
- 7:56Corpus study methodology
- 10:46Any type misuse patterns
- 18:50Future language directions
- 19:31Q&A
related talks
13mPython 3 Types in the Wild: A Tale of Two Type Systems
27mGradual Typing in Practice
30mTyping at scale: statically type-checking a large codebase
28mMind the gap! Why static typing requires more than just adding annotations
38mMigrating existing codebases to using type annotations
31mStatic Type Analysis for Robust Data Products
28mGradual Typing in Python
57mWhy You Should Care About Types
