es6

ECSA-262范例第六版/2015年6月

ECMAScript 2015言语范例

这是 ECMA-262 第六版,ECMAScript 2015 言语范例 HTML 花样的翻译。

文档的 PDF 花样的翻译位于
http://www.ecma-international…

PDF 版本是终究肯定的范例。在 PDF 版本和 HTML 版本中涌现任何不一致的处所都是无意之失。

Ecma International(欧洲计算机制造商协会)
Rue du Rhone 114
CH-1204 Geneva
电话:+41 22 849 6000
传真:+41 22 849 6001
网站:http://www.ecma-international…

版权声明

©2015 Ecma International

文档能够被拷贝、宣布、分发,它的某些衍生物能够悉数或部份的被编写、拷贝、宣布、分发。只需上述版权关照、版权许可和免责声明均包含在一切此类副本和衍生物中。依据版权许可和免责条目许可的唯一衍生作品是:

  1. 对文档的悉数或部份内容举行诠释或诠释(像是文档的一份注解版本)的作品
  2. 在文档的悉数或部份内容基本上到场一些可达性的特征的作品
  3. 将文档翻译成其他非英语言语或差别的花样
  4. 运用这份范例在范例化产物中完成(比方,经由过程拷贝或粘贴悉数或部份)功用

然则,文档自身的内容不能以任何体式格局修正,包含删除版权声明或 Ecma International 的援用,除非需要把它翻译成其他非英语言语或一个差别的花样。

Ecma International 文档的官方版本是英文版,存放在 Ecma International 网站上。翻译版本和官方版本涌现不一致的状况,以官方版本为准。

限于以上许可内容,Ecma International 及其继承者或受让者将永久不会取销。

这份文档及内里包含的信息供应一个“AS IS”基本,Ecma International 不做任何保证,以及昭示或暗示,包含但不限于:不保证运用这里的信息不会侵占任何一切权;不保证有销路或适用于特定用处。

软件许可证

Todo

目次

引见
1.局限
2.一致性
3.参考范例
4.概览
附录A
附录B
附录C
附录D
附录E

引见

这份 Ecma 范例定义了言语 Ecmascript 2015。它是 Ecmascript 言语范例第六版。自从1997年宣布初版以来,ECMAScript已生长为一个世界上最普遍运用的通用编程言语。它是最著名的 web 浏览器嵌入式言语,但它也被普遍的用于服务端和嵌入式运用顺序。自从1997年第一个版本宣布以来,第六版对 ECMAScript 举行了最大局限的晋级。

ECMAScript 2015 的目的是为大型运用、类库制造、以ECMAScript 作为编译目的的其他言语供应更好的支撑。它重要加强的一些包含:模块、类的声明、词法块作用域、迭代器、generators、异步编程promises、解构、尾挪用。ECMAScript 内置库已扩大成能够支撑分外的数据笼统,包含:maps、sets、二进制数组、字符串和正则表达式中支撑了unicode 追加的字符。如今内置功用能够经由过程子类扩大。

ECMAScript 基于几个手艺泉源。最著名的是 Javascipt(网景)和 Jscript(微软)。这门言语是由 Brendan Eich 在网景时发现的,在(网景)公司的 Navigator 2.0 浏览器上第一次运用。它运用于网景厥后一切的浏览器中以及微软 IE3.0 以后的版本中。

ECMAScript 言语范例的开辟始于1996年11月。1997年6月,第一个 ECMA 范例的版本被 ECMA 委员会采纳。

1998年4月,这份 ECMA 范例采纳疾速顺序提交给 ISO/IEC JTC 1,并被批准成为 ISO/IEC 16262 国际范例。ECMA 委员会在1998年6月批准了 ECMA-262 第二版,和 ISO/IEC 16262 保持一致。初版和第二版之间的变化实际上是编辑上的差别。

第三版范例引入了壮大的正则表达式、更好的字符串处置惩罚、新的掌握语句、try/catch 非常处置惩罚、更严厉的毛病定义、花样化数值输入和展望言语将来增进的纤细变化。ECMAScript 范例第三版在1999年12月 Ecma 集会上经由过程并在2002年6月作为 ISO/IEC 16262:2002 范例宣布。

After publication of the third edition, ECMAScript achieved massive adoption in conjunction with the World Wide Web where it has become the programming language that is supported by essentially all web browsers. Significant work was done to develop a fourth edition of ECMAScript. However, that work was not completed and not published as the fourth edition of ECMAScript but some of it was incorporated into the development of the sixth edition.

The fifth edition of ECMAScript (published as ECMA-262 5th edition) codified de facto interpretations of the language specification that have become common among browser implementations and added support for new features that had emerged since the publication of the third edition. Such features include accessor properties, reflective creation and inspection of objects, program control of property attributes, additional array manipulation functions, support for the JSON object encoding format, and a strict mode that provides enhanced error checking and program security. The Fifth Edition was adopted by the Ecma General Assembly of December 2009.

The fifth Edition was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262:2011. Edition 5.1 of the ECMAScript Standard incorporated minor corrections and is the same text as ISO/IEC 16262:2011. The 5.1 Edition was adopted by the Ecma General Assembly of June 2011.

Focused development of the sixth edition started in 2009, as the fifth edition was being prepared for publication. However, this was preceded by significant experimentation and language enhancement design efforts dating to the publication of the third edition in 1999. In a very real sense, the completion of the sixth edition is the culmination of a fifteen year effort.

Dozens of individuals representing many organizations have made very significant contributions within Ecma TC39 to the development of this edition and to the prior editions. In addition, a vibrant informal community has emerged supporting TC39’s ECMAScript efforts. This community has reviewed numerous drafts, filed thousands of bug reports, performed implementation experiments, contributed test suites, and educated the world-wide developer community about ECMAScript. Unfortunately, it is impossible to identify and acknowledge every person and organization who has contributed to this effort.

ECMAScript 新的用处和需求不断涌现。 The sixth edition provides the foundation for regular, incremental language and library enhancements.

Allen Wirfs-Brock
ECMA-262, 第六版项目编辑

2015年6月 Ecma 范例被大会采纳。

ECMAScript 2015 言语范例

1 局限

本范例定义了 ECMAScript 2015 通用编程言语。

2 一致性

完成 ECMAScript 一致性必需供应且支撑范例中所形貌的一切的范例、值、对象、属性、要领和顺序的语法和语义。

完成 ECMAScript 一致性必需诠释与 Unicode 范例5.1.0以上版本或 ISO/IEC 10646符合的源文本输入。假如采纳ISO/IEC 10646-1子集且没有迥殊申明,则推定为 Unicode 字符集,包含 ISO/IEC 10646。

    原文作者:siwuxie
    原文地址: https://segmentfault.com/a/1190000014180022
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞