Existential Containers in Scala
Type classes have been well-established as a powerful tool to write generic algorithms and data structures while escaping vexing limitations of subtyping with respect to extensibility, binary methods, and partial abstractions. Unfortunately, type classes are typically inadequate to express run-time polymorphism and dynamic dispatch, two features considered central to object-oriented systems. This paper explains how to alleviate this problem in Scala. We present existential containers, a form of existential types bounded by type classes rather than types, and explain how to implement them using Scala's existing features.
Cite this item
Racordon, D., Flesselle, E., & Bovel, M. (2024). Existential Containers in Scala. In M. A. Ertl, C. M. Kirsch, & C. M. Kirsch (Editors), MPLR 2024 - Proceedings of the 21st ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes, Co-located with: ISSTA 2024. https://doi.org/10.1145/3679007.3685056
Click Copy to copy the citation, or select the text manually.
2-s2.0-85207094019
École Polytechnique Fédérale de Lausanne
École Polytechnique Fédérale de Lausanne
École Polytechnique Fédérale de Lausanne
2024-09-13
9798400711183
55
64
REVIEWED
EPFL
| Event name | Event acronym | Event place | Event date |
Vienna, Austria | 2024-09-19 - 2024-09-19 | ||