Affiliation:
1. Morgan Stanley, USA / Columbia University, USA
Abstract
By 2006, C++ had been in widespread industrial use for 20 years. It contained parts that had survived unchanged since introduced into C in the early 1970s as well as features that were novel in the early 2000s. From 2006 to 2020, the C++ developer community grew from about 3 million to about 4.5 million. It was a period where new programming models emerged, hardware architectures evolved, new application domains gained massive importance, and quite a few well-financed and professionally marketed languages fought for dominance. How did C++ -- an older language without serious commercial backing -- manage to thrive in the face of all that?
This paper focuses on the major changes to the ISO C++ standard for the 2011, 2014, 2017, and 2020 revisions. The standard library is about 3/4 of the C++20 standard, but this paper's primary focus is on language features and the programming techniques they support.
The paper contains long lists of features documenting the growth of C++. Significant technical points are discussed and illustrated with short code fragments. In addition, it presents some failed proposals and the discussions that led to their failure. It offers a perspective on the bewildering flow of facts and features across the years. The emphasis is on the ideas, people, and processes that shaped the language.
Themes include efforts to preserve the essence of C++ through evolutionary changes, to simplify its use, to improve support for generic programming, to better support compile-time programming, to extend support for concurrency and parallel programming, and to maintain stable support for decades' old code.
The ISO C++ standard evolves through a consensus process. Inevitably, there is competition among proposals and clashes (usually polite ones) over direction, design philosophies, and principles. The committee is now larger and more active than ever, with as many as 250 people turning up to week-long meetings three times a year and many more taking part electronically. We try (not always successfully) to mitigate the effects of design by committee, bureaucratic paralysis, and excessive enthusiasm for a variety of language fashions.
Specific language-technical topics include the memory model, concurrency and parallelism, compile-time computation, move-semantics, exceptions, lambda expressions, and modules. Designing a mechanism for specifying a template's requirements on its arguments that is sufficiently flexible and precise yet doesn't impose run-time costs turned out to be hard. The repeated attempts to design ``concepts'' to do that have their roots back in the 1980s and touch upon many key design issues for C++ and for generic programming.
The description is based on personal participation in the key events and design decisions, backed by the thousands of papers and hundreds of meeting minutes in the ISO C++ standards committee's archives.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference372 articles.
1. David Abrahams Rani Sharoni and Doug Gregor. 2010. Allowing Move Constructors to Throw (Rev. 1). ISO/IEC JTC1/SC2/WG21: C++ Standards Committee paper N3050. 12 March 2010. http://www.open- std.org/jtc1/sc22/wg21/ docs/papers/2010/n3050.html (also at Internet Archive 4 Sept. 2019 02:05:46 ). David Abrahams Rani Sharoni and Doug Gregor. 2010. Allowing Move Constructors to Throw (Rev. 1). ISO/IEC JTC1/SC2/WG21: C++ Standards Committee paper N3050. 12 March 2010. http://www.open- std.org/jtc1/sc22/wg21/ docs/papers/2010/n3050.html (also at Internet Archive 4 Sept. 2019 02:05:46 ).
2. ADAS Wikipedia 2020. ADAS: Advanced driver-assistance systems. https://en.wikipedia.org/wiki/Advanced_driverassistance_systems (also at Internet Archive 9 May 2019 04:16:15 ). ADAS Wikipedia 2020. ADAS: Advanced driver-assistance systems. https://en.wikipedia.org/wiki/Advanced_driverassistance_systems (also at Internet Archive 9 May 2019 04:16:15 ).
3. James Adcock. 1990. Request for Consideration – Overloadable Unary operator.(). 8 Oct. 1990. http://www.openstd.org/jtc1/sc22/wg21/docs/papers/1990/WG21%201990/X3J16_90%20WG21%20Request%20for%20Consideration%20-%20Overloadable%20Unary%20operator.pdf (also at Internet Archive 4 Sept. 2019 02:05:46 ). James Adcock. 1990. Request for Consideration – Overloadable Unary operator.(). 8 Oct. 1990. http://www.openstd.org/jtc1/sc22/wg21/docs/papers/1990/WG21%201990/X3J16_90%20WG21%20Request%20for%20Consideration%20-%20Overloadable%20Unary%20operator.pdf (also at Internet Archive 4 Sept. 2019 02:05:46 ).
4. Andrei Alexandrescu Hans Boehm Kevlin Henney Doug Lea and Bill Pugh. 2004. Memory model for multithreaded C++. ISO/IEC JTC1/SC2/WG21: C++ Standards Committee paper N1680. 10 Sept. 2004. http://www.open- std.org/jtc1/sc22/ wg21/docs/papers/2004/n1680.pdf (also at Internet Archive 4 Sept. 2019 02:05:46 ). Andrei Alexandrescu Hans Boehm Kevlin Henney Doug Lea and Bill Pugh. 2004. Memory model for multithreaded C++. ISO/IEC JTC1/SC2/WG21: C++ Standards Committee paper N1680. 10 Sept. 2004. http://www.open- std.org/jtc1/sc22/ wg21/docs/papers/2004/n1680.pdf (also at Internet Archive 4 Sept. 2019 02:05:46 ).
5. Matthew Austern. 2001. A Proposal to Add Hashtables to the Standard Library. ISO/IEC JTC1/SC2/WG21: C++ Standards Committee paper N1326. 17 Oct. 2001. http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2001/n1326.html (also at Internet Archive 4 Sept. 2019 02:05:46 ). Matthew Austern. 2001. A Proposal to Add Hashtables to the Standard Library. ISO/IEC JTC1/SC2/WG21: C++ Standards Committee paper N1326. 17 Oct. 2001. http://www.open- std.org/jtc1/sc22/wg21/docs/papers/2001/n1326.html (also at Internet Archive 4 Sept. 2019 02:05:46 ).
Cited by
6 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Embracing modern C++ features: An empirical assessment on the KDE community;Journal of Software: Evolution and Process;2023-08-02
2. Evolving a Programming CS2 Course: A Decade-Long Experience Report;Proceedings of the 54th ACM Technical Symposium on Computer Science Education V. 1;2023-03-02
3. Detecting C++ Compiler Front-End Bugs via Grammar Mutation and Differential Testing;IEEE Transactions on Reliability;2023-03
4. Save the Earth, Program in C++!;2022 IEEE 16th International Scientific Conference on Informatics (Informatics);2022-11-23
5. Detecting Compiler Bugs Via a Deep Learning-Based Framework;International Journal of Software Engineering and Knowledge Engineering;2022-05