ICFP 2018 (series) / Scala 2018 (series) / Scala 2018 /
Truly Abstract Interfaces for Algebraic Data Types: The Extractor Typing Problem
Fri 28 Sep 2018 14:17 - 14:40 at Frisco - Session 2: Scala Extensions & Parsing Chair(s): Philipp Haller
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.
Fri 28 SepDisplayed time zone: Guadalajara, Mexico City, Monterrey change
Fri 28 Sep
Displayed time zone: Guadalajara, Mexico City, Monterrey change
13:10 - 14:40 | |||
13:10 22mTalk | Garnishing Parsec with Parsley Scala 2018 DOI | ||
13:32 22mTalk | Interflow: Interprocedural Flow-Sensitive Type Inference and Method Duplication Scala 2018 DOI | ||
13:55 22mTalk | Parser Combinators for Context-Free Path Querying Scala 2018 Ekaterina Verbitskaia Saint Petersburg State University, Russia, Ilya Kirillov Saint Petersburg State University, Russia, Ilya Nozkin Saint Petersburg State University, Russia, Semyon Grigorev Saint Petersburg State University, Russia DOI | ||
14:17 22mTalk | Truly Abstract Interfaces for Algebraic Data Types: The Extractor Typing Problem Scala 2018 Nicolas Stucki EPFL, Switzerland, Paolo G. Giarrusso EPFL, Switzerland, Martin Odersky EPFL, Switzerland DOI |