Persimmon: Nested Family Polymorphism with Extensible Variant Types
Many obstacles stand in the way of modular, extensible code. Some language constructs, such as pattern matching, are not easily extensible. Inherited code may not be type safe in the presence of extended types. The burden of setting up design patterns can discourage users, and parameter clutter can make the code less readable. Given these challenges, it is no wonder that extensibility often gives way to code duplication. We present our solution: Persimmon, a functional system with nested family polymorphism, extensible variant types, and extensible pattern matching. Most constructs in our language are built-in “extensibility hooks,” cutting down on the parameter clutter and user burden associated with extensible code. Persimmon preserves the relationships between nested families upon inheritance, enabling extensibility at a large scale. Since nested family polymorphism can express composable extensions, Persimmon supports mixins via an encoding. We show how Persimmon can be compiled into a functional language without extensible variants with our translation to Scala. Finally, we show that our system is sound by proving the properties of progress and preservation.
Fri 25 OctDisplayed time zone: Pacific Time (US & Canada) change
13:50 - 15:30 | Types and Gradual Typing 2OOPSLA 2024 at Pasadena Chair(s): Fabian Muehlboeck Australian National University | ||
13:50 20mTalk | Degrees of Separation: A Flexible Type System for Safe Concurrency OOPSLA 2024 DOI | ||
14:10 20mTalk | Full Iso-recursive Types OOPSLA 2024 Litao Zhou University of Hong Kong, Qianyong Wan The University of Hong Kong, Bruno C. d. S. Oliveira University of Hong Kong DOI | ||
14:30 20mTalk | Gradually Typed Languages Should Be Vigilant! OOPSLA 2024 Olek Gierczak Northeastern University, Lucy Menon Northeastern University, Christos Dimoulas Northwestern University, Amal Ahmed Northeastern University, USA DOI | ||
14:50 20mTalk | Merging Gradual Typing OOPSLA 2024 Wenjia Ye National University of Singapore, Bruno C. d. S. Oliveira University of Hong Kong, Matías Toro University of Chile DOI | ||
15:10 20mTalk | Persimmon: Nested Family Polymorphism with Extensible Variant Types OOPSLA 2024 Anastasiya Kravchuk-Kirilyuk Harvard University, Gary Feng University of Waterloo, Jonas Iskander Harvard University, Yizhou Zhang University of Waterloo, Nada Amin Harvard University DOI |