You are previewing Beautiful Architecture.

Beautiful Architecture

Cover of Beautiful Architecture by Georgios Gousios... Published by O'Reilly Media, Inc.
O'Reilly logo

Chapter 13. Software Architecture: Object-Oriented Versus Functional

Bertrand Meyer

One of the arguments for functional programming is better modular design.By analyzing publications advocating this approach, in particular through the example of a framework for financial contracts, we access its strengths and weaknesses, and compare it with object-oriented design. The overall conclusion is that object-oriented design, especially in a modern form supporting high-level routine objects or “agents,” subsumes the functional approach, retaining its benefits while providing higher-level abstractions more supportive of extension and reuse.

Overview

“Beauty,” as a slogan for a software architecture, is not strictly for the beholder to judge. Clear objective criteria exist (Meyer 1997):

Reliability

Does the architecture help establish the correctness and robustness of the software?

Extendibility

How easy is it to accommodate changes?

Reusability

Is the solution general, or better yet, can we turn it into a component to be plugged in directly, off-the-shelf, into a new application?

The success of object technology has largely followed from the marked improvements it brings—if applied properly as a method, not just through the use of an object-oriented programming language—to the reliability, extendibility, and reusability of the resulting programs.

The functional programming approach predates object-oriented thinking, going back to the Lisp language available for almost 50 years. To those fortunate enough ...

The best content for your career. Discover unlimited learning on demand for around $1/day.