This paper presents a novel and simple solution to Wadler’s Expression Problem that works in conventional object-oriented languages. Unlike all existing solutions in Java-like languages, this new solution does not use any kind of generics: it relies only on subtyping. The key to the solution is the use of covariant type refinement of return types (or fields): a simple feature available in many object-oriented languages, but not as widely known or used as it should be. We believe that our results present valuable insights for researchers and programming language designers interested in extensibility. Furthermore our results have immediate applicability as practical design patterns for programmers interested in improving extensibility of their programs.
Wed 16 MarDisplayed time zone: Belfast change
10:30 - 12:30
|Segregating Feature Interfaces to Support Software Product Line Maintenance
Bruno B. P. Cafeo PUC-Rio, Brazil, Claus Hunsen University of Passau, Germany, Alessandro Garcia PUC-Rio, Brazil, Sven Apel University of Passau, Jaejoon Lee Lancaster University, UKDOI
|Reasoning Tradeoffs in Languages with Enhanced Modularity Features
|Unveiling and Reasoning about Co-change Dependencies
Marcos César de Oliveira MPOG, Brazil, Rodrigo Bonifácio University of Brasília, Brazil, Guilherme N. Ramos University of Brasília, Brazil, Márcio Ribeiro Federal University of Alagoas (UFAL)DOI
|The Expression Problem, Trivially!