In the late 1980s, when I first learned to program in C, I cobbled together data structures and algorithms from books and pretended they were generic or they could be generalized, perhaps even by macros. Invariably, however, I would end up copying them or tweaking them for every new task that came along. A typical application in those days might have dozens of implementations of linked lists, each coded with varying degrees of usefulness.
Fortunately, the Standard Template Library (STL) came along in the mid-1990s, and the ANSI/ISO committee for C++ standards quickly embraced it. Thus, STL put an end to code cloning and by most accounts ushered in the era of generic programming. Other programming languages rarely match the power of the STL, even those that offer loads of built-in containers and iterators.
STL has been a major boon for C++ programmers. It gives them a ready-made set of common classes (such as containers and associative arrays) that they can use with any built-in type or any user-defined type that supports copying and assignment.
The article continues at http://www.developer.com/net/cplus/article.php/3550906