HackerPapers

arXiv:2011.07653cs.PL

Coming to Terms with Your Choices: An Existential Take on Dependent Types

Georg Stefan Schmid, Olivier Blanvillain, Jad Hamza, Viktor Kunčak

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Type-level programming is an increasingly popular way to obtain additional type safety. Unfortunately, it remains a second-class citizen in the majority of industrially-used programming languages. We propose a new dependently-typed system with subtyping and singleton types whose goal is to enable type-level programming in an accessible style. At the heart of our system lies a non-deterministic choice operator. We argue that embracing non-determinism is crucial for bringing dependent types to a broader audience of programmers, since real-world programs will inevitably interact with imprecisely-typed, or even impure code. Furthermore, we show that singleton types combined with the choice operator can serve as a replacement for many type functions of interest in practice. We establish the soundness of our approach using the Coq proof assistant. Our soundness approach models non-determinism using additional function arguments to represent choices. We represent type-level computation using singleton types and existential types that quantify over choice arguments. To demonstrate the practicality of our type system, we present an implementation as a modification of the Scala compiler. We provide a case study in which we develop a strongly-typed wrapper for Spark datasets.

arXiv comments
25 pages, 11 figures. A version of this manuscript had been submitted for review in the first half of 2020
Journal reference
DOI
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Sep 2021 to Sep 2021.

Comments linking this paper, per year.

Discussed in comments1 thread

    • > The “ Some safe and some bold predictions” comment is almost exactly my view on how programming should evolve. (functional, reactive, going toward dependent types etc ) Interesting how in 2012 it was already so clear! Given that languages used broadly in the industry are…

      still_grokkingView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.