Previous article

Next article


Union Types for Object-Oriented Programming

Atsushi Igarashi, Graduate School of Informatics, Kyoto University, Japan
Hideshi Nagira, Graduate School of Informatics, Kyoto University, Japan

space REFEREED
ARTICLE


PDF Icon
PDF Version

Abstract

We propose union types for statically typed class-based object-oriented languages as a means to enhance the flexibility of subtyping. As its name suggests, a union type can be considered the set union of instances of several types and behaves as their least common supertype. It also plays the role of an interface that “factors out” commonality—fields of the same name and methods with similar signatures—of given types. Union types can be useful for implementing heterogeneous collections and for grouping independently developed classes with similar interfaces, which has been considered difficult in languages like Java. To rigorously show the safety of union types, we formalize them on top of Featherweight Java and prove that the type system is sound.


Note: Due to the typographical sophistication of this article, no HTML version is available. Please use the PDF version.

About the author

Atsushi Igarashi is an associate professor at Kyoto University. His home page is at http://www.sato.kuis.kyoto-u.ac.jp/~igarashi/.

Hideshi Nagira is a Ph.D student at Graduate School of Informatics, Kyoto University.


Cite this article as follows: Atsushi Igarashi, Hideshi Nagira: "Union Types for Object-Oriented Programming", in Journal of Object Technology, vol. 6, no. 2, Special Issue OOPS Track at SAC 2006, February 2007, pages 47–68, http://www.jot.fm/issues/issues 2007_02/article3

 


Previous article

Next article