ACM Transactions on Programming Languages and Systems · 1990 · 14 citations · 5 references
ComputingComputer ScienceProgramming LanguagesSyntaxTypologyAbstract Syntax TreesData TypesGeneric ProgrammingPolymorphism AnalysisType SystemsGeneric TypesHierarchyPolymorphic Type SystemsPolymorphic TypesPolymorphism StudiesRecord TypesType Polymorphism
A record data type can be extended by addition of more fields. The extended type is a subtype of the original, in that any value of the extended type can be regarded as a value of the original type by ignoring the additional fields. This results in a type hierarchy. Milner [3] has proposed a polymorphic type system. With the Milner approach, the type of a function may contain type variables. This also results in a type hierarchy. In a language with a polymorphic type system, if it is anticipated that a record type will need to be extended, then the record type can be defined to have a dummy extension field . In the parent type, the extension field will have null contents of type void . The type of the extension field can differ with different subtypes. The approach can be extended to allow a type to be subtype of two or more parent types. To a limited extent, this approach can be used in Ada and other languages with generic program units.
5
A theory of type polymorphism in programming
Robin Milner · Journal of Computer and System Sciences · 1978 · 2.2K citations · Full text
Niklaus Wirth · ACM Transactions on Programming Languages and Systems · 1988 · 99 citations · Full text
ML with extended pattern matching and subtypes
Lalita Jategaonkar, John C. Mitchell · 1988 · 81 citations · Full text
Functional programs as executable specifications
David A. Turner · 1985 · 56 citations