II

Comparative Analysis

What follows is a comparative analysis of a series of exercises written in traditional object-oriented (OO) style and in “functional” style. The first two exercises may appear familiar to you; the OO portions come from examples that I published in Clean Craftsmanship.1

1. Robert C. Martin, Clean Craftsmanship (Addison-Wesley, 2021).

Both versions of each of the examples were created using the discipline of test-driven development (TDD). The tests are shown with the code in an incremental fashion. You’ll see how the first test was passed, then the second, then the third, and so on.

The point of this part of the book is to explore and examine the differences between OO implementations and functional implementations.

The ...

Get Functional Design: Principles, Patterns, and Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.