Parametric polymorphism and inheritance are both important, extensively explored language mechanisms for providing code reuse and extensibility. But harmoniously integrating these apparently distinct mechanisms—and powerful recent forms of them, including type classes and family polymorphism—in a single language remains an elusive goal. In this paper, we show that a deep unification can be achieved by generalizing the semantics of interfaces and classes. The payoff is a significant increase in expressive power with little increase in programmer-visible complexity. Salient features of the new programming language include retroactive constraint modeling, underpinning both object-oriented programming and generic programming, and module-level inheritance with further-binding, allowing family polymorphism to be deployed at large scale. The resulting mechanism is syntactically light, and the more advanced features are transparent to the novice programmer. We describe the design of a programming language that incorporates this mechanism; using a core calculus, we show that the type system is sound. We demonstrate that this language is highly expressive by illustrating how to use it to implement highly extensible software and by showing that it can not only concisely model state-of-the-art features for code reuse, but also go beyond them.
Thu 26 Oct
|10:30 - 10:52|
|10:52 - 11:15|
|11:15 - 11:37|
Sylvan ClebschImperial College London, Juliana FrancoImperial College London, Sophia Drossopoulou, Albert Mingkun Yang, Tobias WrigstadUppsala University, Jan VitekNortheastern University, USADOI
|11:37 - 12:00|
Ryan ScottIndiana University, Omar Navarro-LeijaUniversity of Pennsylvania, USA, Ryan R. NewtonIndiana University, Joseph DeviettiUniversity of PennsylvaniaDOI