Talk:C++ Standard Library
This is the talk page for discussing improvements to the C++ Standard Library article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1Auto-archiving period: 2 months |
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
|
Reorganization of the articles about C++ containers
[edit]Currently there's quite a lot of mess in the articles about C++ containers. A lot of content is duplicated across articles about similar containers. Also, we have quite much material that is reference manual-like or too detailed. I think the situation could be improved by reorganization. My suggestion is that we implement the same structure as in the C++ standard:
- Sequence containers (C++) -
array
,vector
,list
,forward_list
,deque
, - Associative containers (C++) -
map
,set
,multimap
,multiset
- Unordered associative containers (C++) -
unordered_map
,unordered_set
,unordered_multimap
,unordered_multiset
- Container adaptors (C++) -
queue
,stack
,priority_queue
Since each article would cover similar containers, there would be quite less content duplication. The quality of the articles would increase, since the material such as differences among containers could be covered in one place. Lastly, the WP:NOTMANUAL issue would be reduced: the function listings could be merged (I think we could have tables similar to [1], just not for all containers at once and maybe using different style), the functionality itself could be compared, and examples merged. Any thoughts? 1exec1 (talk) 20:01, 2 December 2011 (UTC)
- I agree for merging all these articles as User:1exec1 proposes. Recently I had a kind of dispute concerning WP:NOTMANUAL about code in the article Queue (abstract data type), where all the code examples of queue has been removed: [2]. Adding code - examples demonstrating a container is valuable. Having a workable example a reader can evaluate what has been reading in the article and the article is not becoming a manual. Ggia (talk) 14:03, 3 December 2011 (UTC)
- I've merged the first batch of articles. Please see how it looks. The target page needs quite a lot of copy-editing and cleanup now, though the main ideas have been implemented. 1exec1 (talk) 00:08, 6 December 2011 (UTC)
History and versions
[edit]In this article I am missing information about the history: When was it proposed? What was the first implementations? Different years/dates for various versions? Dependency on versions of C++?
--Mortense (talk) 13:48, 12 April 2020 (UTC)
- The history of the C++ Standard Library is, by definition, tied to the history of the C++ standard itself, and every new version of the C++ standard defines a corresponding version of the C++ Standard Library. (See C++98, C++03, C++11, C++14, C++17, and C++20 for that.)
- The first version of the C++ standard (i.e. C++98) already contained much of Stepanov's Standard Template Library, and Jerry Schwarz's iostreams library. I seem to have mislaid my copy of Stroustrup's book "The Design and Evolution of C++", and I can't say what it has to say about the history of the "pre-standard C++ standard library", so to say. There's however a "History" section in Stroustrup's The C++ Programming Language. Quoting from section 1.4.2.1 "Language Features and Library Facilities" (a subsection of 1.4.2 "The Early Years"):
Section 1.4.3 talks about the 1998 standard. Section 1.4.3.2, titled "The Standard Library" has this to say:The C++ language evolved hand in hand with some of the key library facilities presented in this book. For example, I designed the complex, vector, stack, and (I/O) stream classes together with the operator overloading mechanisms. The first string and list classes were developed by Jonathan Shopiro and me as part of the same effort. ... The development of the template facility was influenced by a variety of vector, map, list, and sort templates devised by Andrew Koenig, Alex Stepanov, me, and others.
The greatest and most important innovation in the 1998 standard was the inclusion of the STL, a framework of algorithms and containers, in the standard library. It was the work of Alex Stepanov (with Dave Musser, Meng Lee, and others) based on more than a decade's work on generic programming. Andrew Koenig, Beman Dawes, and I did much to help get the STL accepted. ... Except for the STL, the standard library was a bit of a hodgepodge of components, rather than a unified design. ... The standard-library string had its origins in early work by Jonathan Shopiro and me at Bell Labs but was revised and extended by several different individuals and groups during standardization. The valarray library for numerical computation is primarily the work of Kent Budge. Jerry Schwarz transformed my streams library into the iostreams library using Andrew Koenig's manipulator technique and other ideas. The iostreams library was further refined during standardization, where the bulk of the work was done by Jerry Schwarz, Nathan Myers, and Norihiro Kumagai.
- (One note: A conforming implementation of standard C++ needs to provide the functionality of the C++ Standard Library. However, strictly speaking, the C++ standard library need not be implementable in standard C++.) – Tea2min (talk) 18:01, 12 April 2020 (UTC)
- There's two papers by Stroustrup that mention some of the history of the C++ Standard Library:
- A History of C++: 1979-1991. Proc ACM History of Programming Languages conference (HOPL-2). ACM Sigplan Notices. Vol 28 No 3, pp 271-298. March 1993.
- There's a section "5.3 Libraries" in that paper but not much of would become the C++ Standard Library.
- Evolving a language in and for the real world: C++ 1991-2006. ACM HOPL-III. June 2007.
- There's a section "4. The Standard Library: 1991-1998", with section 4.1 about the STL and section 4.2 "Other Parts of the Standard Library"
- Perhaps these papers can be condensed into a "History" section of C++ Standard Library. – Tea2min (talk) 20:39, 12 April 2020 (UTC)
GNU C++ Library
[edit]Why it is not mentioned in the text? Is there a reason for that? What about LLVM's implementation? — Preceding unsigned comment added by 2804:431:CFFB:BFC5:528C:3C3C:A5AF:E8CE (talk) 21:48, 5 July 2020 (UTC)
- Literally had the same question. Aren't libstdc++ (with libsup++) and libc++ (with libc++abi) the most used implementations? And MS STL? Why are they not even mentioned? Gsnxn (talk) 16:16, 11 November 2020 (UTC)
STL is just a part of standard library
[edit]I guess, STL is the algorithm and datastructure part of the standard library, typically std::vector, std::list, std::array, and the algoritmhs and iterators connecting to them. But iostream, fstream (writing to the console or into files) is not part of STL, they are the part of standard library. 84.3.83.186 (talk) 21:29, 5 August 2020 (UTC)
- that is your guess. In my experience there are at least five different common uses of this abbreviation:
- the library developed at HP in the 1990s, later maintained by SGI until year 2000 (STL version 3.3), and erased from the SGI's website in 2018
- the elements of C++ standard library directly based by the interfaces from the "STL" above (std::vector, std::copy, std:bind1st)
- the elements of C++ standard library similar in spirit (the above, plus std:array, std:reduce, std::function)
- all templates in the C++ standard library (the above, plus std::fstream, std::atomic, std::regex)
- all of the C++ standard library (including non-templates like std::runtime_error, std::any, std::to_chars). Microsoft in particular actively uses "STL" in this sense.
- --Cubbi (talk) 22:21, 5 August 2020 (UTC)
Student borrow book
[edit]ID day of borrowed Submit day. 196.189.127.193 (talk) 13:16, 31 October 2024 (UTC)