Title
A New Formalization of Subtyping to Match Subclasses to Subtypes.
Abstract
Most object-oriented languages do not support explicit recursive types, which are useful to define binary methods and some kinds of factory methods, because explicit recursive types lead to a mismatch between subclassing and subtyping. This mismatch means that an expression of a subclass may not always be usable in a context where an expression of a superclass is expected, which is not intuitive in an object-oriented setting. In this paper, we present a new subtyping formalization, which allows subclassing to match subtyping even in the presence of recursive types in an object-oriented language. The formalization comes from a new perspective on object types and subtyping, which clearly distinguishes object types and some-object types and defines a new subtype relation on some-object types. We formally prove that the new subtype relation can successfully replace the traditional one and that subclassing always matches subtyping even in the presence of recursive types in a language. We believe that our formalization makes it easier to understand objects than the traditional formalization because of a simple encoding of objects in a typed lambda calculus.
Year
DOI
Venue
2014
10.1007/978-3-319-07151-0_15
Lecture Notes in Computer Science
Field
DocType
Volume
USable,Binary methods,Subclass,Superclass,Computer science,Object type,Theoretical computer science,Subtyping,Recursion
Conference
8475
ISSN
Citations 
PageRank 
0302-9743
2
0.40
References 
Authors
19
2
Name
Order
Citations
PageRank
Hyunik Na181.56
Sukyoung Ryu218525.77