Modularity 2016
Mon 14 - Thu 17 March 2016 Spain
Wed 16 Mar 2016 12:00 - 12:30 at MODULARITY - Modular Design and Reasoning Chair(s): Hridesh Rajan

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.