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. Conferences, Workshops, Symposiums, and Seminars
  4. Truly abstract interfaces for algebraic data types: the extractor typing problem
 
Loading...
Thumbnail Image
conference paper

Truly abstract interfaces for algebraic data types: the extractor typing problem

Stucki, Nicolas Alexander  
•
Giarrusso, Paolo Giosuè  
•
Odersky, Martin  
September 28, 2018
Proceedings of the 9th ACM SIGPLAN International Symposium on Scala
Scala 2018

Pattern matching enables inspecting algebraic data types, but typically prevents hiding the implementation of the matched algebraic data type. In Scala, instead, extractors also allow pattern matching on non-algebraic data types and invoking methods on the obtained objects, while partially decoupling API consumers from the API implementation. But as we show in this paper, pattern matching using extractors is restricted compared to matching against case classes. We argue this violates the appropriate variant of the uniform access principle. To address this problem, we propose a small language extension, which enables defining truly abstract interfaces and freely evolve their implementation.

  • Files
  • Details
  • Metrics
Type
conference paper
DOI
10.1145/3241653.3241658
Author(s)
Stucki, Nicolas Alexander  
•
Giarrusso, Paolo Giosuè  
•
Odersky, Martin  
Date Issued

2018-09-28

Published in
Proceedings of the 9th ACM SIGPLAN International Symposium on Scala
Total of pages

5

Subjects

Scala

•

abstract types

•

interfaces

•

extractors

•

pattern matching

Peer reviewed

REVIEWED

Written at

EPFL

EPFL units
LAMP1  
Event nameEvent placeEvent date
Scala 2018

St. Louis, Missouri, USA

September 28-28, 2018

Use this identifier to reference this record
https://infoscience.epfl.ch/handle/20.500.14299/151631
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