History of C++之一(C++历史比较透彻的讲解了C++标准中的变化)
作者:互联网
来自: https://cplusplus.com/info/history/ Written by Albatross.
History of C++(C++历史)
The C++ programming language has a history going back to 1979, when Bjarne Stroustrup was doing work for his Ph.D. thesis. One of the languages Stroustrup had the opportunity to work with was a language called Simula, which as the name implies is a language primarily designed for simulations. The Simula 67 language - which was the variant that Stroustrup worked with - is regarded as the first language to support the object-oriented programming paradigm. Stroustrup found that this paradigm was very useful for software development, however the Simula language was far too slow for practical use.
C++编程语言的历史可以追溯到1979年,当时Bjarne Stroustrup正在撰写博士论文。Stroustrup有机会使用的语言之一是一种叫做Simula的语言,
顾名思义,Simula是一种主要为模拟设计的语言。Simula 67语言是Stroustrup使用的变体,被视为第一种支持面向对象编程范式的语言。
Stroustrup发现这种范式对于软件开发非常有用,但是Simula语言的速度太慢,无法实际使用。
补充:
Bjarne Stroustrup 自己的网站 https://www.stroustrup.com/
https://www.stroustrup.com/WG21.html
一、C with Classes
Shortly thereafter, he began work on "C with Classes", which as the name implies was meant to be a superset of the C language. His goal was to add object-oriented programming into the C language, which was and still is a language well-respected for its portability without sacrificing speed or low-level functionality. His language included classes, basic inheritance, inlining, default function arguments, and strong type checking in addition to all the features of the C language.
此后不久,他开始研究“C with Classes”,顾名思义,这是C语言的超集。他的目标是将面向对象编程添加到C语言中,
C语言在不牺牲速度和低级功能的情况下,以其可移植性而备受推崇,现在仍然如此。除了C语言的所有特性外,他的语言还包括
类、基本继承、内联、默认函数参数和强类型检查。
二、Cfront
The first C with Classes compiler was called Cfront, which was derived from a C compiler called CPre.
第一个C with Class编译器叫做Cfront,它是从一个叫做CPre的C编译器派生出来的。
补充:
关于C with Classes请参看 https://www.cnblogs.com/aozhejin/p/16357904.html
It was a program designed to translate C with Classes code to ordinary C. A rather interesting point worth noting is that Cfront was written mostly in C with Classes, making it a self-hosting compiler
(a compiler that can compile itself).
这是一个设计用来将带有类的C代码转换为普通C的程序。值得注意的一点是,Cfront主要是用带有类的C编写的,这使它成为一个自主编译器(一个可以自己编译的编译器)。
Cfront would later be abandoned in 1993 after it became difficult to integrate new features into it, namely C++ exceptions. Nonetheless,Cfront made a huge impact on the implementations of future compilers and on the Unix operating system.
Cfront后来在1993年被放弃,因为很难将新功能集成到它中,即C++异常。尽管如此,Cfront对未来编译器的实现和Unix操作系统产生了巨大影响
In 1983, the name of the language was changed from C with Classes to C++. The ++ operator in the C language is an operator for incrementing a variable, which gives some insight into how Stroustrup regarded the language. Many new features were added around this time, the most notable of which are virtual functions, function overloading, references with the & symbol, the const keyword, and single-line comments using two forward slashes (which is a feature taken from the language BCPL).
1983年,该语言的名称从C with Class更改为C++。C语言中的++操作符是一个用于递增变量的操作符,这可以让我们了解Stroustrup是如何看待这种语言的。
这段时间添加了许多新特性,其中最引人注目的是虚拟函数、函数重载、带有&符号的引用、const关键字和使用两个正斜杠的单行注释(这是从BCPL语言中提取的特性)。
In 1985, Stroustrup's reference to the language entitled The C++ Programming Language was published. That same year, C++ was implemented as a commercial product. The language was not officially standardized yet, making the book a very important reference. The language was updated again in 1989 to include protected and static members, as well as inheritance from several classes.
1985年,Stroustrup 发表了对名为"The C++ Programming Language" 的语言的引用。同年,C++作为一种商业产品实现。该语言尚未正式标准化,这使得该书成为一本非常重要的参考书。
1989年,该语言再次更新,以包括受保护和静态成员,以及从几个类继承。
In 1990, "The Annotated C++ Reference Manual " was released. The same year, Borland's Turbo C++ compiler would be released as a commercial product. Turbo C++ added a plethora of additional libraries which would have a considerable impact on C++'s development. Although Turbo C++'s last stable release was in 2006, the compiler is still widely used.
1990年,发布了带注释的C++参考手册。同年,Borland的Turbo C++编译器将作为商业产品发布。Turbo C++添加了大量额外的库,这将对C++的开发产生相当大的影响。
尽管Turbo C++'的上一个稳定版本是在2006年,但编译器仍在广泛使用。
补充: The Annotated C++ Reference Manual 这本书请看 https://www.stroustrup.com/arm.html
三、C++98->C++03(1998-2003)
In 1998, the C++ standards committee published the first international standard for C++ ISO/IEC 14882:1998, which would be informally known as C++98.
The Annotated C++ Reference Manual was said to be a large influence(影响) in the development of the standard. The Standard Template Library,
which began its conceptual development in 1979, was also included. In 2003, the committee responded to multiple problems that were reported with their 1998 standard, and revised it accordingly.
The changed language was dubbed C++03.
1998年,C++标准委员会发布了第一个C++ ISO/IEC 14882:1998国际标准,非正式名称为C++98。据说,带注释的C++参考手册对标准的开发有很大的影响。
1979年开始概念开发的The Standard Template Library也包括在内。
2003年,委员会对1998年标准中报告的多个问题作出了回应,并对其进行了相应修订。更改后的语言命名为 C++03。
补充可参看 cppreference 网站
https://zh.cppreference.com/w/cpp/11
四、C++0x(2005)
In 2005, the C++ standards committee released a technical report (dubbed TR1) detailing various features they were planning to add to the latest C++ standard. The new standard was informally dubbed C++0x as it was expected to be released sometime before the end of the first decade. Ironically, however, the new standard would not be released until mid-2011. Several technical reports were released up until then, and some compilers began adding experimental support for the new features.
2005年,C++标准委员会发布了一份技术报告(称为TR1),详细介绍了他们计划添加到最新C++标准中的各种功能。新标准被非正式地称为C++0x,
因为它预计将在第一个十年结束前的某个时候发布。然而,具有讽刺意味的是,新标准要到2011年年中才会发布。在此之前,发布了几份技术报告,
一些编译器开始为新功能添加实验支持。
补充: Bjarne Stroustrup在2005-2011期间发布了多篇关于 C++0x的论文或paper
What is C++0x? https://www.stroustrup.com/what-is-2009.pdf
A Brief Look at C++0x https://www.artima.com/articles/a-brief-look-at-c0x
2012以前,ISO/IEC 出版使用TR(technical report,技术报告)格式。自2012起ISO程序改用TS(technical specification ,技术规范)格式。
五、C++11(2011)
In mid-2011, the new C++ standard (dubbed C++11) was finished. The Boost library project made a considerable impact on the new standard, and some of the new modules were derived directly from the corresponding Boost libraries. Some of the new features included regular expression support (details on regular expressions may be found here), a comprehensive randomization library, a new C++ time library, atomics support, a standard threading library (which up until 2011 both C and C++ were lacking), a new for loop syntax providing functionality similar to foreach loops in certain other languages, the auto keyword, new container classes, better support for unions and array-initialization lists, and variadic templates.
2011年年中,新的C++标准 the new C++ standard (称为 C++11)完成。Boost library project (Boost库项目)对新标准产生了相当大的影响,一些新模块直接来自相应的Boost库。
一些新特性包括正则表达式支持(正则表达式的详细信息可以在这里找到)、一个全面的随机化库、一个新的C++时间库、原子支持、一个标准线程库(到2011年为止,C和C++都没有),
一个新的for循环语法提供了类似于某些其他语言中foreach循环的功能,auto关键字,新的容器类,更好地支持联合和数组初始化列表,以及可变模板。
补充:;来自: https://zh.cppreference.com/w/cpp/11
C++11 是 C++ 的第二个主要版本(前一个是 C++98 而后一个是 C++17 ),并且是从 C++98 起的最重要更新。
它引入了大量更改,标准化了既有实践,并改进了对 C++ 程序员可用的抽象。
在它最终由 ISO 在 2011 年 8 月 12 日承认前,人们曾使用名称 'C++0x' ,因为它曾被期待在 2010 年之前发布。
C++03 与 C++11 期间花了 8 年时间,故而这是迄今为止最长的版本间隔。从那时起, C++ 规则地每 3 年更新一次。
标签:language,C++,standard,Stroustrup,透彻,new,was,History 来源: https://www.cnblogs.com/aozhejin/p/16357916.html