🤖 AI Summary
This study investigates developers’ empirical practices of using dynamic typing (specifically the `Any` type) in progressively typed languages, using Python with mypy as a representative case. To address the lack of systematic evidence on `Any` usage, we conduct a large-scale static analysis of 221 open-source GitHub projects, parse mypy type-checking logs, and apply corpus linguistic methods. Our analysis yields the first empirically grounded taxonomy of eight distinct `Any` usage patterns. These patterns reveal that `Any` serves deliberate, structurally meaningful roles—such as interface abstraction, framework interoperability, and incremental migration—rather than merely reflecting type omissions or developer laziness. The findings provide actionable insights for refining progressive type systems (e.g., by contextually adjusting `Any` propagation rules) and for designing context-aware tooling to guide type annotation. By grounding design decisions in real-world practice, this work bridges a critical gap in the empirical understanding of dynamic typing in hybrid type systems.
📝 Abstract
Gradually-typed languages feature a dynamic type that supports implicit coercions, greatly weakening the type system but making types easier to adopt. Understanding how developers use this dynamic type is a critical question for the design of useful and usable type systems. This paper reports on an in-progress corpus study of the dynamic type in Python, targeting 221 GitHub projects that use the mypy type checker. The study reveals eight patterns-of-use for the dynamic type, which have implications for future refinements of the mypy type system and for tool support to encourage precise type annotations.