||Design patterns inspired by functional programming concepts
can advance object-oriented design. This thesis promotes the idea that
concepts from the world of functional programming can be captured with
design pattern descriptions. These can then be used to benefit from functional
programming concepts with ordinary object-oriented languages. The functional
patterns are evaluated for their impact on language design and a new approach
to a dual-paradigm language is presented.
Table of Contents
I have obtained permission from the publisher to distribute the book electronically
free of charge. Download a copy of the pdf
file without the copyrighted pictures by M. C. Escher. You may still be able
to get a printed
copy with the pictures. The Portland
Pattern Repository features some
pages written by others about this work.
This book integrates the vital areas of object-orientation, functional
programming, design patterns, and language design. The most important concepts
from functional programming are captured with six design patterns.
||Black-box behavior parameterisation
||Abandoning null references
||Combining internal & external iteration
||Homomorphic mapping with multi-dispatch functions
These patterns can be used with any object-oriented language to advance
software design. The patterns form a system, i.e., a collaborating set
of patterns. In their "Related Patterns" sections the patterns refer to
each other and to many other published design patterns.
Each of the relevant areas (object-orientation, functional programming,
design patterns) is introduced in the first part of the book. This part
also compares the functional and object-oriented paradigms both in terms
of concepts and on a calculus level.
The second part presents the functional pattern system. This system
should be beneficial to software practitioners since it integrates the
functional paradigm into object-oriented software design. Hence, advantages
which have been primarily available in functional languages can be used
in object-oriented languages as well. Even when some functional concepts
have been partially established in object-oriented software practice already,
they can now be understood as specialized uses of more general functional
This practical aspect is complemented by a theoretical account of multi-paradigm
language design. An evaluation of the pattern system for its implications
on language design in the third part is concluded by proposing a new distribution
of responsibilities between languages and their environments.
The book uses the Eiffel programming language to illustrate the patterns
with running sample code. It includes a critical review of the Eiffel language
in terms of its suitability as a functional pattern implementation language.
Design patterns inspired by functional programming concepts can advance
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
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.
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.
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 resulting language
design based on the notion of hierarchical tiles allows transcending the
limitations of each paradigm by providing the optimal paradigm view on
There is also a german extended abstract
(8 pages) which has no english equivalent. The book itself is written in English.