So the standard c++ library mainly contains roughly 7 categories,
what's the rationale/prototype that make it deserve being the standard?
BTW,which category does socket programing related stuff belong to in the c++ standard library?
I don't know that it makes much sense to say that the C++ standard library has a single unifying design principle (perhaps object oriented programming, orthogonality, or type covariance?), but it does have some technical design goals. According to Bjarne Stroustrup (quoted from the C++ programming language, page 429-430), the STL does the following:
Provides support for language features, such as memory management and run-time type information.
Supplies information about implementation-defined aspects of the language, such as the largest float value.
Supplies functions that cannot be implemented optimally in the language itself for every system, such as sqrt() and memmove().
Supplies nonprimitive facilities that a programmer can rely on for portability, such as lists, maps, sort functions, and I/O streams.
Provides a framework for extending the facilities it provides, such as conventions and support facilities that allow a user to provide I/O of a user-defined type in the style of I/O for built-in types.
Provides the common foundation for other libraries.
what's the rationale/prototype that make it deserve being the standard?
The same rationale/prototype that made C++98 a standard.
In the 90's, a lot of compiler writers were poking with extensions to C. These usually involved adding object-oriented features to C (hence the term "C with Classes"). This was the early days of the internet, and many people involved with compiler writing and language extensions started standardizing things.
The standard library was part of that process. Iostreams came from certain developers. The reason that much of the standard library is called "STL" is because the Standard Template Library was a widely distributed proto-C++ library based on a new feature making the rounds in C++ compilers: templates.
Eventually, an ISO committee decided to get together and form a real standard. They took all the bits that people called "C++", ironed out a few incompatibilities (iostreams became templated on the character type, though they forgot some things there), and eventually agreed on the ISO standard.
As for "socket programming," that's not part of the C++ standard library. Therefore it does not belong in any of those categories.
The only reason those categories exist is because that's what is in the standard library. C++0x will add more categories (threads is a big one).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With