Use Site Checking Considered Harmful
Static type checking aims to detect nonsensical operations based on their domains at compile time. While its benefits no longer need to be argued, it comes with expressiveness limitations that can only be lifted at the expense of complexity. This problem is particularly antithetical to generic programming, where algorithms and data structures are designed in the most general setting possible. In response, some systems have adopted a form of static duck typing: generic definitions are written against assumed interfaces that are only type checked with concrete types at their ultimate use sites. This essay claims that such an approach, which we refer to as use site checking, is harmful to user experience. We study four main problems caused by use site checking and show how they relate to similar well-known issues in dynamically typed languages. We then look at existing language constructs to discuss how statically typed languages may address these shortcomings.
2-s2.0-85212583337
École Polytechnique Fédérale de Lausanne
University of Washington
2024-10-17
9798400712159
275
287
REVIEWED
EPFL
Event name | Event acronym | Event place | Event date |
Pasadena, United States | 2024-10-23 - 2024-10-25 | ||