Article

Static Type Inference for Parametric Classes

02/2001;
Source: CiteSeer

ABSTRACT Method inheritance and data abstraction are central features of objectoriented programming that are attained through a hierarchical organization of classes. Recent studies have shown that method inheritance can be supported by an ML style type inference when extended to labeled records. This is based on the observation that a function that selects a eld f of a record can be given a polymorphic type that enables it to be applied to any record which contains a eld f . Several type systems also provide data abstraction through abstract type declarations. However, these two features have not yet been properly integrated in a statically checked polymorphic type system. This paper proposes a static type system that achieves this integration in an ML-like polymorphic language by adding a class construct which allows the programmer to build a hierarchy of classes connected by multiple inheritance declarations. Classes can be parameterized by types allowing generic" de- nitions...

0 0
 · 
0 Bookmarks
 · 
20 Views

Full-text

View
0 Downloads
Available from

Keywords

abstract type declarations
 
Classes
 
data abstraction
 
de- nitions
 
eld f
 
hierarchical organization
 
method inheritance
 
ML style type inference
 
ML-like polymorphic language
 
multiple inheritance declarations
 
objectoriented programming
 
polymorphic type
 
polymorphic type system
 
records
 
static type system
 
two features
 
type systems