Nominal and Structural Subtyping in Component-Based Programming.
Klaus Ostermann · The Journal of Object Technology · 2008
In nominal type systems, the subtype relation is between names of types, and subtype links are explicitly declared.In structural type systems, names are irrelevant; in determining type compatibility, only the structure of types is considered, and a type name is just an abbreviation for the full type.We analyze structural and different flavors of nominal subtyping from the perspective of component-based programming, where issues such as blame assignment and modular extensibility are important.Our analysis puts various existing subtyping mechanisms into a common frame of reference and delineates the frontiers of the subtyping design space.In addition, we propose a new subtyping definition in one particularly interesting corner of the design space which combines the safety of nominal subtyping with the flexibility of structural subtyping.