Summary
In this chapter, we looked at the use of C++ functions as a major program-building tool. For a given functionality of the program, there exist numerous ways of implementing that functionality in C++ code.
The goal of allocating jobs to functions is to arrive at a program whose functions can be understood and maintained in isolation from other functions and are easy to reuse in other contexts. Everything that requires the client designer (or maintainer) to read the code in several places for understanding and modification, impedes reuse and maintenance.
The criteria of readability and component independence are too general. For a practicing programmer, these criteria have to be supplemented by more-specific technical criteria. In this ...
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