Generic programming centers around the idea of abstracting from concrete, efficient algorithms to obtain generic algorithms that can be combined with different data representations to produce a wide variety of useful software.
— Musser, David R.; Stepanov, Alexander A., Generic Programming
Describe what to do, rather than how to do it。
Program to an ‘interface’, not an ‘implementation’.
Favor ‘object composition’ over ‘class inheritance’.