Sciweavers

OOPSLA
2007
Springer

Combining structural subtyping and external dispatch

14 years 6 months ago
Combining structural subtyping and external dispatch
Nominal subtyping (or user-defined subtyping) and structural subtyping each have their own strengths and weaknesses. Nominal subtyping allows programmers to explicitly express design intent, and, when types are associated with run time tags, enables runtime “type” tests (e.g., downcasts) and external/multimethod dispatch. On the other hand, structural subtyping is flexible and compositional, allowing unanticipated reuse. To date, nearly all objectoriented languages fully support only one subtyping paradigm or the other. In this paper, we describe a core calculus for a language that combines the key aspects of nominal and structural subtyping in a unified framework. Our goal is to combine the flexibility of structural subtyping while still allowing static typechecking of external methods. We prove type safety for this language and illustrate its practical utility through examples that are not easily expressed in other languages. Our work provides a clean foundation for the desi...
Donna Malayeri
Added 08 Jun 2010
Updated 08 Jun 2010
Type Conference
Year 2007
Where OOPSLA
Authors Donna Malayeri
Comments (0)