Dotty Phantom Types

Phantom types are a well-known type-level, design pattern which is commonly used to express constraints encoded in types. We observe that in modern, multi-paradigm programming languages, these encodings are too restrictive or do not provide the guarantees that phantom types try to enforce. Furthermore, in some cases they introduce unwanted runtime overhead. We propose a new design for phantom types as a language feature that: (a) solves the aforementioned issues and (b) makes the first step towards new programming paradigms such as proof-carrying code and static capabilities. This paper presents the design of phantom types for Scala, as implemented in the Dotty compiler.


Année
Jul 21 2017
Laboratoires:


Note: Le statut de ce fichier est:


 Notice créée le 2020-01-10, modifiée le 2020-01-13

PREPRINT:
Télécharger le document
PDF

Évaluer ce document:

Rate this document:
1
2
3
 
(Pas encore évalué)