When studying for a doctoral degree (PhD), candidates submit a thesis that provides a critical review of the current state of knowledge of the thesis subject as well as the student’s own contributions to the subject. The distinguishing criterion of doctoral graduate research is a significant and original contribution to knowledge.
Once accepted, the candidate presents the thesis orally. This oral exam is open to the public.
Nowadays Object-Oriented Programming (OOP) is widely considered as the de-facto general programming paradigm. While successful, OOP is not without problems. In 1994, a book was published with a set of 23 design patterns addressing recurring problems found in OOP software. These patterns are well-known in the industry and are taught in universities as part of software engineering curricula. Despite their usefulness in solving recurring problems, these design patterns bring a certain complexity in their implementation. That complexity, however, is influenced by the features available in the implementation language. In this work, we choose to look at design patterns by focusing on the problems they attempt to solve and the language features that can be used to solve them. We aim to contribute a guideline for designing extensions for better support of immutability in OOP languages.
Our main goal is to investigate the impact of specific language features on OOP and make recommendations to improve OOP languages in general. We first perform a mapping study to catalogue the language features that have been proposed in the literature to improve design pattern implementations. From those features, we focus on investigating the impact of immutability-related features on OOP.
We then perform an exploratory study measuring the impact of introducing immutability in OOP software with the objective of establishing the advantages and drawbacks of using immutability in the context of OOP. Results indicate that immutability may produce more granular and easier-to-understand programs.
We also perform an experiment to measure the impact of new language features added into the C# language for better immutability support. Results show that these specific language features improve the quality of life for developers aiming to implement immutability in OOP.
We finally present a new design pattern aimed at solving a problem with method overriding in the context of immutable hierarchies of objects. We discuss the impact of language features on the implementation of this pattern by comparing it in different programming languages, including Clojure, Java, and Kotlin.
Finally, we implement these language features as a language extension to Common Lisp and discuss their usage.