Toward a Corpus Study of the Dynamic Gradual Type

📅 2025-03-11
📈 Citations: 0
Influential: 0
📄 PDF

career value

139K/year
🤖 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.

Technology Category

Application Category

📝 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.
Problem

Research questions and friction points this paper is trying to address.

Analyzes dynamic type usage in gradually-typed languages.
Identifies patterns-of-use for dynamic types in Python projects.
Informs refinements for mypy type system and tool support.
Innovation

Methods, ideas, or system contributions that make the work stand out.

Analyzes dynamic type usage in Python
Studies 221 GitHub projects using mypy
Identifies eight dynamic type usage patterns
🔎 Similar Papers
No similar papers found.