Summary
Phew!
That was a very swift tour through the Standard Template Library!
Clearly, the STL is a rich mine of functionality, but it is not easy to use, by any means.
More study will be required for you to become familiar and comfortable with it.
My Take on the C++ Standard Template Library
I have done a lot of programming in other languages. In particular, I have spent a lot of time with Java, so I can compare the C++ STL with the Java set of libraries. They are very, very different:
- The C++ STL is very abstract, which results in a very steep learning curve and difficulties figuring out how to use it.
The Java libraries are much more focused on solving real world problems. They are much easier to learn and use (although there’s a lot to learn! That is more because of having lots of functionality to learn, rather than figuring out arcane usage.)- The C++ STL is organized under one namespace, std. Java’s libraries are organized into many packages (Java’s equivalent to namespace), based on what is being used.
- The Java libraries contain support for data structures, graphics, database, networking, concurrency (threads), streams, and more.
The C++ STL is much more limited, primarily having support for data structures, some support for concurrency (threads), but it is more focused on assuming the programmer will use the STL for fundamental building blocks; it is assumed that the programmer will do much more work in order to accomplish what is needed – much less is built in.I sometimes wonder how much the STL is actually used by organizations that use C++. I have no doubt that they must be using other C++ libraries produced by other vendors, or by themselves, in order to maintain sanity and productivity for their organization.