CMU-CS-09-100
Computer Science Department
School of Computer Science, Carnegie Mellon University



CMU-CS-09-100

Is Structural Subtyping Useful?
An Empirical Study

Donna Malayeri, Jonathan Aldrich

December 2009

CMU-CS-09-100.pdf


Keywords: Multiple inheritance, muliple dispatch, diamond inheritance

Structural subtyping is popular in research languages, but all mainstream object-oriented languages use nominal subtyping. Since languages with structural subtyping are not in widespread use, the empirical questions of whether and how structural subtyping is useful have thus far remained unanswered. This study aims to provide answers to these questions. We identified several criteria that are indicators that nominally typed programs could benefit from structural subtyping, and performed automated and manual analyses of open-source Java programs based on these criteria. Our results suggest that these programs could indeed be improved with the addition of structural subtyping. We hope this study will provide guidance for language designers who are considering use of this subtyping discipline.

22 pages


Return to: SCS Technical Report Collection
School of Computer Science

This page maintained by reports@cs.cmu.edu