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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access