Repository logo

Infoscience

  • English
  • French
Log In
Logo EPFL, École polytechnique fédérale de Lausanne

Infoscience

  • English
  • French
Log In
  1. Home
  2. Academic and Research Output
  3. Reports, Documentation, and Standards
  4. Dotty Phantom Types
 
report

Dotty Phantom Types

Stucki, Nicolas Alexander  
•
Biboudis, Aggelos  
•
Odersky, Martin  
July 21, 2017

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.

  • Files
  • Details
  • Metrics
Loading...
Thumbnail Image
Name

Dotty Phantom Types.pdf

Type

Preprint

Version

http://purl.org/coar/version/c_71e4c1898caa6e32

Access type

openaccess

Size

374.31 KB

Format

Adobe PDF

Checksum (MD5)

05719a8351326a6b00d901ecd21243c4

Logo EPFL, École polytechnique fédérale de Lausanne
  • Contact
  • infoscience@epfl.ch

  • Follow us on Facebook
  • Follow us on Instagram
  • Follow us on LinkedIn
  • Follow us on X
  • Follow us on Youtube
AccessibilityLegal noticePrivacy policyCookie settingsEnd User AgreementGet helpFeedback

Infoscience is a service managed and provided by the Library and IT Services of EPFL. © EPFL, tous droits réservés