Affiliation:
1. EPFL, Lausanne, Switzerland
2. EPFL & Oracle Labs, Lausanne, Switzerland
Abstract
A scalable programming language is one in which the same concepts can describe small as well as large parts. Towards this goal, Scala unifies concepts from object and module systems. An essential ingredient of this unification is the concept of objects with type members, which can be referenced through path-dependent types. Unfortunately, path-dependent types are not well-understood, and have been a roadblock in grounding the Scala type system on firm theory.
We study several calculi for path-dependent types. We present DOT which captures the essence - DOT stands for Dependent Object Types. We explore the design space bottom-up, teasing apart inherent from accidental complexities, while fully mechanizing our models at each step. Even in this simple setting, many interesting patterns arise from the interaction of structural and nominal features.
Whereas our simple calculus enjoys many desirable and intuitive properties, we demonstrate that the theory gets much more complicated once we add another Scala feature, type refinement, or extend the subtyping relation to a lattice. We discuss possible remedies and trade-offs in modeling type systems for Scala-like languages.
Funder
European Research Council
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
10 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Recursive Subtyping for All;Proceedings of the ACM on Programming Languages;2023-01-09
2. A case for DOT: theoretical foundations for objects with pattern matching and GADT-style reasoning;Proceedings of the ACM on Programming Languages;2022-10-31
3. Bounded Abstract Effects;ACM Transactions on Programming Languages and Systems;2022-01-12
4. Implementing path-dependent GADT reasoning for Scala 3;Proceedings of the 12th ACM SIGPLAN International Symposium on Scala;2021-10-17
5. Virtual ADTs for portable metaprogramming;Proceedings of the 18th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes;2021-09-29