Design patterns inspired by functional programming concepts can advance object-oriented design.


The object-oriented paradigm has undoubtfully raised our ability to design and maintain large complex software systems. However, it does not seem to have meet the high expectations concerning reuse and ease of evolution which have been promoted ever since its commercial success. There are many potential reasons for the above observation such as unqualified staff, immature languages, inadequate methodologies, inappropriate business processes, etc. The view presented here is that although the object-oriented paradigm is a powerful basis, it is incomplete in its inherent concepts and therefore restricts the design space to inappropriate solutions. It is assumed that both software development and language design are restrained from achieving their full potential when restricted to a purely object-oriented world view.


Since the complementary paradigm to object-orientation is represented by functional programming, I investigate high-level, well-known to work functional concepts and examine their suitability to enhance object-oriented design. I explore the software engineering relevance of each concept and present its intent, applicability, implementation, and consequences in the literate form of a design pattern. My approach clearly motivates functional techniques for object-oriented design from a software engineering point of view. This is different to the usual procedure of designing a new language with an ``ad-hoc'' conglomeration of functional and object-oriented features. The latter case requires excellence in language design and makes it hard to find out and evaluate uses of the new language. In contrast, design patterns are already widely used to improve design. As functional concepts constitute a powerful paradigm by themselves, it is more than suggestive to assume that design patterns expressing successful functional concepts will enhance the object-oriented paradigm with new capabilities.



I demonstrate the feasibility of using functional techniques in object-oriented designs which are to be implemented by ordinary object-oriented programming languages. This is done at the level of a calculus comparison and in concrete design pattern implementation descriptions. I demonstrate synergetic effects caused by concept integration, which together with the advantages of functional patterns, thus, show the utility of the approach.

Software production

Object-oriented practitioners hopefully will use the names of functional design patterns as a vocabulary to discuss solutions in a new design space. I present a system of patterns which are connected by relations that describe how individual patterns may interact and collaborate with each other. This system, consisting of state-of-the-art mini-architectures, may allow thinking and designing beyond restrictions imposed by a dogmatic object-oriented approach. As a result, the quality of software is hoped to improve.

Language Design

Using functional patterns for object-oriented design can be regarded as dual-paradigm design. In this light, functional design patterns appear as language idioms that lift an object-oriented language to a dual paradigm implementation language. It is very instructive to verify how well an object-oriented language supports the implementation of these idioms, since limiting properties are expected to interfere in other attempts to produce flexible and maintainable software as well. Unless one is restricted to use a certain existing language, it is, however, only natural to consider direct language support in order to avoid the repetitive implementation of these idioms. A holistic language that encompasses both object-oriented and functional paradigms should provide more ease of use, increased safety, better initial execution efficiency, and higher optimization potential. I consider each presented design pattern for its contribution to language constructs that support a dual paradigm language. The software engineering considerations, contained in each design pattern description, help to avoid ``featurism'' in favor of conceptually founded language principles. Ultimately, impulses initiated by the functional pattern system lead to a reevaluation of the role distribution between a programming language and its associated environment. The result allows transcending the limitations of each paradigm by providing the optimal paradigm view on demand.

328 pages.
More information here.