The coding techniques and the implementations provided focus on tasks and issues that traditionally fall in the area of design, activities usually done before coding. These elements are combined to achieve a very high rate of reuse, both horizontally and vertically. On the horizontal dimension, a small amount of library code implements a combinatorialand essentially open-endednumber of structures and behaviors. On the vertical dimension, the generality of these components makes them applicable to a vast range of programs. Design patterns are distilled pieces of good designrecipes for sound, reusable solutions to problems that can be encountered in manycontexts.
Design patterns concentrate on providing a suggestive lexicon for designs to be conveyed.
They describe the problem, a time-proven solution with its variants, and the consequences of choosing each variant of that solution. Design patterns go above and beyond anything a programming language, no matter how advanced, could possibly express. By following and combining certain design patterns, the components presented in this book tend to address a large category of concrete problems. Generic programming is a paradigm that focuses on abstracting types to a narrow collection of functional requirements and on implementing algorithms in terms of these requirements. Because algorithms define a strict and narrow interface to the types they operate on, the same algorithm can be used against a wide collection of types.