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 ...

Get Core C++ A Software Engineering Approach 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.