📜  ES6版本

📅  最后修改于: 2021-01-01 03:44:34             🧑  作者: Mango

ES6版本

ECMA-262共发布了十个版本。关于版本10的工作已于2019年6月完成。ECMA-262的十个版本如下:

Edition Date Published Name Changes from the prior edition Editor
1. June 1997 First Edition Guy L. Steele Jr.
2. June 1998 Editorial changes for keeping the specification fully aligned with the ISO/IEC 16262 international standard. Mike Cowlishaw
3. December 1999 Addition of Regular expressions, new control statements, better string handling, tighter error definitions, numeric output formatting, try/catch exception handling, and other enhancements. Mike Cowlishaw
4. Abandoned The fourth edition was abandoned because of the political differences concerning language complexity. Several features proposed for this edition have been dropped completely.
5. December 2009 Addition of ‘strict mode,’ a subset which is intended to give more by error checking and avoid error-prone constructs. It clarifies several ambiguities in the 3rd edition specifications, and it also accommodates the behavior of the real-world implementations, which consistently differed from that specification. Addition of some new features, like getters and setters, library support for JSON. Pratap Lakshman, Allen Wirfs-Brock
5.1 June 2011 This 5.1 edition of the ECMAScript standard is fully aligned with the third edition of the ISO/IEC 16262:2011. Pratap Lakshman, Allen Wirfs-Brock
6. June 2015 ECMAScript 2015 (ES 2015) Addition of new syntax for writing applications, including the class declarations, ES6 modules, but defines them in the same terms as ECMAScript5 strict mode. Other features of this update include iterators, arrow function expression, Python-style generators, binary data, typed arrays, new collections, etc. Allen Wirfs-Brock
7. June 2016 ECMAScript 2016 (ES 2016) The major standard language includes features such as destructing patterns of variables, block-scoping of functions and variables, proper tail calls, exponentiation operator for numbers, etc. Brian Terison
8. June 2017 ECMAScript 2017 (ES 2017) It includes async/await constructions, which works by using generators and promises. It also contains the features for concurrency and atomics, syntactic integration with promises (async/await). Brian Terison
9. June 2018 ECMAScript 2018 (ES 2018) Its new features include rest/spread operators for variables, asynchronous iteration. Brian Terison
10. June 2019 ECMAScript 2019 (ES 2019) Addition of new features include Array.prototype.flatMap, Array.prototype.flat, and changes to Array.sort and Object.fromEntries. Brian Terison, Bradley Farias, Jordan Harband

在2004年6月,ECMA International发布了ECMA-357标准,用于定义ECMAScript的扩展,即ECMAScript for XML

让我们尝试详细说明ECMAScript的版本。

第四版(废弃)

ECMA-262的第四版( ECMAScript 4ES4 )是自1999年第三版发布以来对ECMAScript的第一次更新。该规范的目标是到2008年10月完成。

到2008年8月,第四版ECMAScript已缩减为代号为ECMAScript Harmony的项目。讨论中当时用于和谐的功能包括类,破坏性分配,模块系统,可选的类型注释和静态类型等。

此外,为增加新功能,某些ES3错误计划在版本4中修复。这些修复和其他错误,以及对JSON编码/解码的支持,均已包含在ECMAScript第五版规范中。

2007年下半年,和克里斯·威尔逊(微软的平台架构师的互联网浏览器)(Mozilla基金会后来的CTO)艾希之间的争论成为公众许多博客。

第四版由于语言复杂性的政治差异而被放弃。此版本建议的一些功能已完全删除。

第5版

雅虎,微软,谷歌和第四版的其他反对者组成了其小组委员会,以设计不太雄心勃勃的ECMAScript 3更新,名为ECMAScript 3.1。此版本将侧重于库和安全更新,重点是兼容性。在公开辩论之后,ECMAScript 3.1和ECMAScript 4团队就折衷方案达成了共识。

一段时间后, Brendan Eich宣布ECMA TC39将专注于ECMAScript 3.1(后来的ECMAScript,第五版)的工作以及各方的全面协作,并且供应商将在2009年之前实现至少两个实施目标。 ECMA TC39已发布了与5版相关的草案,并宣布可互操作性实施的测试将于7月中旬完成。但是,2009年12月3日,发布了第五版ECMA-262。

第6版-ECMAScript 2015

此版本最初被称为ECMAScript 6ES6 ,后来更名为ECMAScript 2015,该版本于2015年6月完成。此更新为编写复杂的应用程序添加了新的基本语法,包括诸如(class Example { …}) ,ES6模块像import * as from“ …”中的moduleName一样; export const示例,但以与ECMAScript 5严格模式相同的顺序定义它们。它还包括其他一些新功能,例如Python样式生成器,用于本地声明的let关键字,箭头函数表达式,用于常量变量声明的const关键字,二进制数据,类型数组,新集合,反射,数字和数学增强等。更多。

第7版-ECMAScript 2016

7版被正式称为ECMAScript的2016,将其在最终确定2016年6月的标准语言包括诸如函数和变量块作用域,破坏的变量模式,适当的尾调用,异步/ AWAIT关键字异步编程,数字的乘幂运算符**

第8版-ECMAScript 2017

8版被正式称为ECMAScript的2017年,并于2017年六月敲定它包括异步/ AWAIT结构,其使用的承诺的工作(在CS的未来,承诺,延期和延迟指的是用于同步构建在某些并行编程语言程序)和发电机的执行。

ECMAScript 2017或第8版还包含原子和并发功能以及带有Promise的语法集成功能。

第9版-ECMAScript 2018

9版被正式称为ECMAScript的2018年,这是最终确定在2018年六月它包括像其余/传播运算符的变量的新特性(三个点:…标识符),异步迭代,等等。

第10版-ECMAScript 2019

10版正式称为ECMAScript的2019年,发表在2019年六月它包括添加一些新的功能,如Array.prototype.flatMap,Array.prototype.flat,和改变的Array.sortObject.fromEntries。

ES.Next

它只不过是一个动态名称,在撰写本文时就引用了下一个版本。单一版本的协调计划太过严格,将其功能划分为两组:第一组具有最高优先级,并且将成为ES5之后的后续版本。 ECMAScript.next是该版本的代号,以避免过早提交已被ES4证实为可疑的版本号。第二组有时间直到ECMAScript.next之后。