Summary
We have seen in this chapter that we can use multiple paradigms to program in C++. We looked briefly at a few: functional programming, metaprogramming, types that ensure compile-time validation, and extreme polymorphism. Each of these approaches, as well as the standard object-oriented and structured programming, are useful for various contexts when building libraries or specific programs. Each of them has something to offer to the curious programmer who wants to learn as much as possible about their craft. Each of them has its trade-offs and its own implementations in the world of software development.
We have shown that C++ programmers perhaps only use a subset of the language, and it doesn’t have to be an object-oriented one. Instead, it’s best to experiment with all of them, making the most of the fact that C++ is powerful enough to offer so many options, and to pick and choose depending on the task at hand.
In the next chapter, we will see that the...