作为Google和Microsoft使用的核心编程语言,C++新版本获得了国际标准化组织的批准。
国际标准化组织(ISO)C++工作组,即第21工作组(WG21),已同意发布C++20版本的最终版内容。对于这个有着35年历史的C++编程语言,这是自2017年发布C++17版本后的首次重大更新。
WG21 C++ ISO委员会常任主席Herb Sutter(他同时也是微软的工程师)说:“ C++20版本的DIS(国际标准草案)投票在9月4日星期五结束,该版本获得一致通过。”
“这意味着C++20版本现在已经获得了最终技术批准,相关的ISO投票也已经完成,我们希望在完成最后一轮ISO编辑工作之后,这个版本标准可以在2020年底正式发布。”
对比以往版本的标准,这次的2020年的C++版本标准是一次重大突破。Sutter说,“它将是C++自C++11版本发布以来最大的一次版本更新”,这意味着它比过去每三年发布一次的三个更新版都要大。这也是第一个已标准化的版本。
C++由丹麦计算机科学家Bjarne Stroustrup创建并在35年前的1985年发布。微软在同一年面向终端消费者发布了Windows操作系统。在微软开发Windows操作系统过程中,C++语言是其核心开发语言。如今,由于Mozilla开发的Rust具有的内存安全性,微软现在正在探索用Rust语言来重写从前用C和C ++编写的Windows系统旧代码。
C++因其是一种运行快速的语言而受到青睐,特别是近年来由于其在硬件交互方面的实用性而日益流行,在计算机游戏开发中C++语言的应用非常广泛。
市场上最重要的C++编译器(例如Microsoft Visual Studio,GNU编译器系列工具(GCC)和Clang)都支持C++17版本。
C++20版本中新加的最重要的两个功能是“模块”和“协程”。
由Google的Richard Smith领导制定的“模块(module)”是在程序的头文件(header file)中定义,旨在支持构建(build)更大的程序的同时帮助隔离宏(macro)的影响。正如Sutter最近指出的那样,C++20标志着“大约35年来C++首次添加了一项新功能,用户可以利用这项功能给一个命名了的封装定义其边界。”
Sutter写道:“到现在为止,我们已经拥有三种语言功能,通过把实现某项功能的代码给隐藏起来并给其定义名称,程序员可以创建自己的“权力之言”。这三种语言功能是:变量(用于封装当前值),函数(用于封装代码和行为)和类(用于封装变量和函数,可以同时提供很多状态和函数),”
协程(coroutine)是对函数(function)的一种概括表示。 C++的贡献者在针对协程(coroutine)的提议中解释说:“常规函数(regular function)总是从函数的开始处开始运行,然后在函数的结束处退出运行,而协程(coroutine)也可以在函数运行到某个点时中止执行,以后还可以在这个中断的地方恢复运行这个函数后面还没有运行的代码。”
在开始阅读英文原文之前,请先复习下列核心词汇:
developer - n. 开发者
program - v. 编程
update - n. 更新
version - n. 版本
ballot - n. 投票
release - n. 发布
module - n. 模块
coroutine - n. 协程
feature - n. 功能
isolate - v. 隔离
effect - n. 效果
macro - n. 宏
implementation - n. 实现
user - n. 用户
variable - n. 变量
encapsulate - v. 封闭
function - n. 函数
class - n. 类
在复习了以上词汇后,请将下面的英文原文一口气读完,不要在中途停下来去查那些不认识的单词。有了上面的核心单词打底,你完全可以将整篇文章读完并且理解里面的大致意思。记住,你只要做到大致明白就可以了。
阅读能力和阅读量成正比,要提高阅读量,必须是大量的泛读,如果要对每个不懂的单词都去查字典,那么就不可能通过大量的泛读来提高你的阅读量。
这篇英语原文是《涂博士雅思辅导课》直播班上用来训练学员快速阅读的文章之一。能够快速阅读各个领域的原版文章并找出文中的核心内容,是真正学好英语的最最基础的技能之一,另一个最最基础的技能就是听得懂原版的广播。有了这两个最最基础的技能打底,学员就可以利用好网上大量的原版英语文章和听力资源,不出国就可以把自己沉浸在英语的环境当中。在建立起强大的语感之后,口语和写作能力都会自然成长起来。
Developers: Programming language C++ is about to get this huge update
A core programming language for Google and Microsoft has been approved to move ahead.
By Liam Tung
ZDNet
The International Organization for Standardization's (ISO) C++ group, Working Group 21 (WG21), has agreed upon the finalized version of 'C++20', the first major update to the 35 year-old programming language since C++17 from 2017.
"On Friday September 4, C++20's DIS (Draft International Standard) ballot ended, and it passed unanimously," said Herb Sutter, a Microsoft engineer and long-time chair of WG21 C++ ISO committee.
"This means that C++20 has now received final technical approval and is done with ISO balloting, and we expect it to be formally published toward the end of 2020 after we finish a final round of ISO editorial work."
The 2020 release of C++ is huge by historical standards. Sutter said it "will be C++'s largest release since C++11", meaning it's bigger than any of the past three releases, which happen every three years. It's also the first version that has been standardized.
C++ was created by Danish computer scientist Bjarne Stroustrup and released 35 years ago, in 1985. The language was critical for Microsoft to build Windows, which was released to consumers in the same year. These days Microsoft is exploring Mozilla-developed Rust to replace legacy Windows code written in C and C++ because of Rust's memory safety qualities.
C++, favored for being a fast language, has risen in popularity in recent years and is widely used in computer games development because of its usefulness in instructing hardware.
Important C++ compilers, such as Microsoft Visual Studio, GNU Compiler Collection (GCC), and Clang, support C++17.
Two of the most important features coming to C++20 are 'modules' and 'coroutines'.
Modules, which was led by Google's Richard Smith, stands in for header files and helps isolate the effects of macros while supporting larger builds. As Sutter noted recently, C++20 marks the "first time in about 35 years that C++ has added a new feature where users can define a named encapsulation boundary."
"Until now, we have had three such language features that let programmers create their own Words of Power by (a) giving a user-defined name to (b) something whose implementation is hidden. They are: the variable (which encapsulates the current value), the function (which encapsulates code and behavior), and the class (which encapsulates both to deliver a bunch of state and functions together)," he wrote.
Coroutines represents a generalization of a function. "Regular functions always start at the beginning and exit at the end, whereas coroutines can also suspend the execution to be resumed later at the point where they were left off," C++ contributors explain in a proposal for coroutines.
标签:20,C++,Sutter,ISO,版本,Microsoft From: https://www.cnblogs.com/ybqjymy/p/17623361.html