Thriving in a crowded and changing world: C++ 2006–2020

Author:

Stroustrup Bjarne1

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

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3