S CALA & DESIGN PATTERNS

Authors

Editor E-Repository FTI UWGM

Synopsis

This thesis explores a wellknown catalog of design patterns in the context of the programming language Scala. Design patterns do in general not exist as reusable components. Scala features novel abstraction mechanisms with a strong focus on the writing of componentsandisthusinteresting to explore in the context of design patterns. General implementation problems concerning design patterns are identified. The analysis of the catalog shows that Scala can deal with some of these problems. Components for three patterns are provided, but in general Scala lacks the needed abstraction mechanisms. The principles behind design patterns, has long been regarded as sound engineering advice. The second principle, “Favor object composition over class inheritance”, is shown to be weakened in Scala. Further, a language feature proposal is presented, that if present in Scala in its full generality would result in the need for reevaluation of the principle.

Published

July 16, 2025

Series