1997 · 71 citations · 26 references
ComputingComputer ScienceFormal MethodsProgramming LanguagesTheory Of ComputationData TypesFunctional ProgrammingObject-oriented ProgrammingType CheckingType SystemsConstraint-based Type CheckingConstructorsDynamic DispatchHigher-order Type CheckingParametric PolymorphismPolymorphic Type SystemsPolymorphic TypesType Constructors
We present a new predicative and decidable type system, called ML≤, suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML [21, 28], and class-based object-oriented programming and higher-order multimethods in the tradition of CLOS [12]. Instead of using extensible records as a foundation for object-oriented extensions of functional languages, we propose to reinterpret ML datatype declarations as abstract and concrete class declarations, and to replace pattern matching on run-time values by dynamic dispatch on run-time types. ML≤ is based on universally quantified polymorphic constrained types. Constraints are conjunctions of inequalities between monotypes built from type constructors organized into extensible and partially ordered classes. We give type checking rules for a small, explicitly typed functional language á la XML [20] with multi-methods, show that the resulting system has decidable minimal types, and discuss subject reduction. Finally, we propose a new object-oriented programming language based on the ML≤ type system.
26
A theory of type polymorphism in programming
Robin Milner · Journal of Computer and System Sciences · 1978 · 2.2K citations · Full text
How to make ad-hoc polymorphism less ad hoc
Philip Wadler, Stephen Blott · 1989 · 770 citations · Full text
Type inclusion constraints and type inference
Alex Aiken, Edward L. Wimmers · 1993 · 260 citations