preface

The purpose of programming is to solve real problems through logical operations, not just dense code. The first step in learning a new programming language is to understand its history. Understanding its origins, development, and how designers think can help you code, program ideas, and inspire creative ideas.


One, three stages

The development of C++ language can be roughly divided into three stages: the first stage from the 1980s to 1995. At this stage, C++ was basically a traditional type of object-oriented language, and with the efficiency of C, occupied a significant share of the development languages used in the industry. The second phase, from 1995 to 2000, saw generic programming take up more and more weight in C++, thanks to the standard template library (STL) and later libraries such as Boost. Of course, C++ was also hit by the emergence of Java, C# and other languages and the massive drop in hardware prices. The third stage from 2000 to now, due to Loki, MPL(Boost) and other libraries represented by the emergence of production programming and template metaprogramming, C++ appeared in the history of development and a new peak, the emergence of these new technologies and the integration of the original technology, so that C++ has become the mainstream programming language in the most complex one.

C++ name origin

In the 1980s, Dr. Biani stroustrup invented and implemented C++ while working at bell LABS. The name C++ was coined by Rick Mascitti in mid-1983 and first used in December 1983. At an earlier time, the investigational language was called “New C,” and later “C with Classes.” It shows that the new language is based on C and is a superset of C. It eventually got its name from the C “++” operator, which increments the value of a variable. And in the common naming convention, “+” is used to indicate enhanced programs. “The name represents a natural evolution from changes in THE C language,” says Stroustrup. C+ is an early programming language unrelated to C/C++. Rick Mascitti was informally asked in 1992 about the origin of his name, which he said he made in a tongue-in-cheek remark. He never expected C++ to become the language’s official name. The joke about C++ names is that when you use the suffix ++, append only happens after the operation (therefore, it should be ++C, not C++, the joke is that some programmers still use C++ in the same way as C, which is generally considered incorrect by some authoritative writings). As an enhanced version of the C language. Since then, C++ has continued to add new features. Virtual functions, operator overloading, Multiple inheritance, Standard Template Library, STL, Exception, Runtime Type information, namespace and other concepts are gradually incorporated into the standard.

C++ standard

Developed by ISO/IEC JTC1/SC22/WG21, published standard documents are as follows:

Release time The document Known as note
2020 ISO/IEC 14882:2020 C++20
2018 ISO/IEC TS 21544:2018 modules TS The module
2018 ISO/IEC TS 19570:2018 parallelism TS Parallel extensions
2018 ISO/IEC TS 19216:2018 networking TS The network library
2017 ISO/IEC 14882:2017 C++17 The fifth C++ standard
2017 ISO/IEC TS 22277:2017 coroutines TS Coroutine library extension
2017 ISO/IEC TS 21425:2017 ranges TS Provide scope mechanism
2017 ISO/IEC TS 19568:2017 library fundamentals TS Standard library extension
2016 ISO/IEC TS 19571:2016 concurrency TS Extensions for concurrent computing
2015 ISO/IEC TS 19217:2015 concepts TS Concept library for optimizing compile-time information
2015 ISO/IEC TS 19841:2015 TM TS Transactional memory operations
2015 ISO/IEC TS 19570:2015 parallelism TS Extensions for parallel computing
2015 ISO/IEC TS 18822:2015 filesystem TS The file system
2014 ISO/IEC 14882:2014 C++14 The fourth C++ standard
2011 ISO/IEC TR 24733:2011 Decimal floating point number extension
2011 ISO/IEC 14882:2011 C++11 The third C++ standard
2010 ISO/IEC TR 29124:2010 Extension of mathematical function
2007 ISO/IEC TR 19768:2007 C++TR1 C++ technical report: library extensions
2006 ISO/IEC TR 18015:2006 C++ performance technical report
2003 ISO/IEC 14882:2003 C++03 The second C++ standard
1998 ISO/IEC 14882:1998 C++98 The first C++ standard

C++ Chronicles

In 1979, Biani Stroustrup began work on “C with Classes,” an idea that grew out of some programming that Stroustrup wrote for her doctoral thesis. He found that Simula had features that were useful for large-scale software development, but that Simula was too slow to be useful for real needs. BCPL is much faster, but its low end nature makes it unsuitable for large-scale software development. While working at Bell LABS, Stroustrup analyzed the problems of distributed computing at the heart of UNIX. Recalling his experience with his doctoral thesis, Stroustrup set out to add some simula-like features to C. C was chosen because of its versatility, speed, and portability. In addition to C and Simula, I also drew inspiration from other languages such as ALGOL 68, Ada, CLU, and ML. At first, categories, derived classes, storage type checking, inlining, and default parameter features were introduced into C through Cfront.

In 1983, the “C with Classes” language was renamed C++. The “++” operator in C, which increments a variable, also shows Stroustrup’s positioning for the new language. During this period, many important features were added, including virtual functions, function overloading, reference mechanisms (the symbol &), const keywords, and single-line comments for double slashes (imported from the BCPL language).

Stroustrup’s C++ reference manual, C++ Programming Language, was published in 1985, the same year a commercial version of C++ was released. Since there was no formal Language specification for C++ at the time, C++ Programming Language became an important reference in the industry.

In 1989, C++ was updated again, introducing language features such as multiple inheritance, protected members, and static members.

The Annotated C++ Reference Manual was published in 1990, the same year Borland’s commercial Turbo C++ compiler appeared. Turbo C++ comes with a large library of functions, which has had a profound impact on C++ development. Although the last stable version of Turbo C++ was released in 2006, the compiler is still widely used today.

In 1998, the C++ standards committee issued the first international standard for C++ – ISO/IEC 14882:1998, which is known as C++98. “The Annotated C++ Reference Manual” is credited with C++98. At the same time, the Standard Template Library (STL), which was developed in 1979, is also included in this edition of the Standard. C++03 was released in 2003 after a revision by the standards committee to address many problems in version 98.

In 2005, the C++ standards committee issued a Technical Report (TR1) detailing new features planned for C++. The new standard is unofficially named C++0x because it is expected to be released sometime in the first decade of this century. Ironically, it wasn’t until mid-2011 that the standard was released, the technical documentation was released, and some compiler vendors began to support the new features on a trial basis.

In 2011, a new C++ standard (C++11) was released. The Boost library has greatly influenced this release, with some new modules even directly deriving from their Boost counterparts. Some new language features include regular expressions (regular expression details), a full-fledged library of random number generators, new time-dependent functions, atomic manipulation support, standard threading libraries (prior to 2011, C and C++ both lack threading support), a new for syntax that achieves the same effect as foreach statements in some languages, the auto keyword, new container classes, better union support, array initializer list support, variadic template support, and more.

In 2014, the C++14 standard was unanimously approved by the C++ standards committee. The C++14 standard is the abbreviation of ISO/IEC 14882:2014 Information technology — Programming languages — C++. It was originally C++1y before the standard was officially adopted. Committee draft N3690 of the C++14 standard was published on May 15, 2013. The draft document will be submitted to ISO for publication as an official C++ standard within this year after some text polishing and revision.

In 2017, the ISO C++ committee officially released the C++ 17 standard, officially known as ISO/IEC 14882:2017. C++17, also known as C++1z, is the unofficial name of the International Standard ISO/IEC Programming Language C++. It is based on C++ 11, which aims to make C++ a less bloated and complex programming language to simplify the daily use of the language and make it easier for developers to write and maintain code.

In 2020, the C++20 standard was technically finalized by WG21 at a conference in Prague, and is currently in the process of final approval after the draft was approved on September 4 of the same year. Compared to C++17, C++20 introduces new language features such as concepts, modules, operators “<=>”, coroutines, specified initializations, new standard properties, and more. The C++20 library standard also adds scope, feature testing macros, and bit manipulation.


conclusion

The above is all the content of this article. This article only briefly introduces the history of C++, and the specific knowledge about C++ will be introduced in the following chapters. Because I only learned some C++ grammar piecemeal before, without systematic study, there may be some mistakes in the article, please correct them, thank you.