Compositional ProgrammingTOPLAS Journal-First
Thu 15 Jul 2021 10:30 - 10:50 at ECOOP 2 - Modular Programming / Types (time band 3) Chair(s): Eelco Visser
Modularity is a key concern in programming. However, programming languages remain limited in terms of modularity and extensibility. Small canonical problems, such as the Expression Problem (EP), illustrate some of the basic issues: the dilemma between choosing one kind of extensibility over another one in most programming languages. Other problems, such as how to express dependencies in a modular way, add up to the basic issues and remain a significant challenge.
This paper presents a new statically typed modular programming style called Compositional Programming. In Compositional Programming, there is no EP: it is easy to get extensibility in multiple dimensions (i.e. it is easy to add new variants as well as new operations). Compositional Programming offers an alternative way to model data structures that differs from both algebraic datatypes in functional programming and conventional OOP class hierarchies. We introduce four key concepts for Compositional Programming: compositional interfaces, compositional traits, method patterns, and nested trait composition. Altogether these concepts allow us to naturally solve challenges such as the Expression Problem, model attribute-grammar-like programs, and generally deal with modular programs with complex dependencies. We present a language design, called CP, which is proved to be type-safe, together with several examples and three case studies.
Slides (cp.pdf) | 8.83MiB |
Wed 14 JulDisplayed time zone: Brussels, Copenhagen, Madrid, Paris change
19:40 - 20:40 | Modular Programming / Types (time band 1)ECOOP Technical Papers at ECOOP 1 Chair(s): Alexander J. Summers University of British Columbia (UBC) | ||
19:40 20mTalk | Compositional ProgrammingTOPLAS Journal-First ECOOP Technical Papers Weixin Zhang University of Bristol, UK, Yaozhu Sun University of Hong Kong, Bruno C. d. S. Oliveira University of Hong Kong DOI Pre-print Media Attached File Attached | ||
20:00 20mTalk | Covariant Conversions (CoCo): A Design Pattern for Type-Safe Modular Software Evolution in Object-Oriented Systems ECOOP Technical Papers Jan Bessai Technical University Dortmund, George Heineman WPI, Boris Düdder University of Copenhagen DOI | ||
20:20 20mTalk | A Dependently Typed Calculus with Polymorphic SubtypingSCICO Journal-First ECOOP Technical Papers DOI |
Thu 15 JulDisplayed time zone: Brussels, Copenhagen, Madrid, Paris change
10:10 - 11:10 | Modular Programming / Types (time band 3)ECOOP Technical Papers at ECOOP 2 Chair(s): Eelco Visser Delft University of Technology | ||
10:10 20mTalk | A Dependently Typed Calculus with Polymorphic SubtypingSCICO Journal-First ECOOP Technical Papers DOI | ||
10:30 20mTalk | Compositional ProgrammingTOPLAS Journal-First ECOOP Technical Papers Weixin Zhang University of Bristol, UK, Yaozhu Sun University of Hong Kong, Bruno C. d. S. Oliveira University of Hong Kong DOI Pre-print Media Attached File Attached | ||
10:50 20mTalk | Covariant Conversions (CoCo): A Design Pattern for Type-Safe Modular Software Evolution in Object-Oriented Systems ECOOP Technical Papers Jan Bessai Technical University Dortmund, George Heineman WPI, Boris Düdder University of Copenhagen DOI |