当前位置: 首页 > 工具软件 > Tc-play > 使用案例 >

ecmascript_TC39及其对ECMAScript的贡献

令狐嘉运
2023-12-01

ecmascript

by Parth Shandilya

通过Parth Shandilya

TC39及其对ECMAScript的贡献 (TC39 and its contributions to ECMAScript)

Many people get confused about what is JavaScript and what is ECMAScript. Sometimes it’s hard to tell how they are connected with each other and what role ECMA International and TC39 play in the standardization of JavaScript.

许多人对什么是JavaScript和什么ECMAScript感到困惑。 有时很难说出它们如何相互连接以及ECMA International和TC39在JavaScript标准化中起什么作用。

In this blog post, I am going to discuss TC39 and its contributions to ECMAScript.

在这篇博客中,我将讨论TC39及其对ECMAScript的贡献。

Let’s start with all the basic terminologies used when talking about JavaScript and ECMAScript.

让我们从谈论JavaScript和ECMAScript时使用的所有基本术语开始。

什么是ECMAScript? (What is ECMAScript?)

ECMAScript is a standard script language, developed with the cooperation of Netscape and Microsoft and mainly derived from Netscape’s JavaScript. JavaScript is a widely-used scripting language that is used in Web pages to affect how they look or behave for the user.

ECMAScript是一种标准脚本语言,由Netscape和Microsoft合作开发,主要源自NetscapeJavaScript。 JavaScript是一种广泛使用的脚本语言,在Web页中使用它来影响它们对用户的外观或行为。

ECMA-262 is a standard published by ECMA International. It contains the specification for a general purpose scripting language which is known as ECMAScript.

ECMA-262是ECMA International发布的标准。 它包含用于通用脚本语言的规范,该规范称为ECMAScript。

有关JavaScript的更多信息 (A bit more about JavaScript)

JavaScript is a scripting language that enables you to create dynamically updating content, to control multimedia, to animate images, and to do pretty much everything else. (Okay, not everything, but it is amazing what you can achieve with a few lines of JavaScript code.)

JavaScript是一种脚本语言,使您能够创建动态更新的内容,控制多媒体,为图像设置动画以及执行几乎所有其他操作。 (好的,不是所有的东西,但是用几行JavaScript代码就能达到的效果令人惊讶。)

什么是ECMA? (What is ECMA?)

ECMA is a standards organization for information and communication systems. ECMA aims to develop standards and technical reports to facilitate and standardize the use of information communication technology and consumer electronics. It encourages the correct use of standards by influencing the environment in which they are applied, and it publishes these standards and reports in electronic and printed form.

ECMA是信息和通信系统的标准组织。 ECMA旨在制定标准和技术报告,以促进和标准化信息通信技术和消费电子产品的使用。 它通过影响标准的应用环境来鼓励正确使用标准,并以电子和印刷形式发布这些标准和报告。

And now, let’s introduce the hard working people behind ECMAScript: TC39.

现在,让我们介绍ECMAScript背后的努力者:TC39。

什么是TC 39? (What is TC 39?)

TC39 means Technical Committee number 39. It is part of ECMA, the institution which standardizes the JavaScript language under the “ECMAScript” specification. It works on the standardization of the general purpose, cross platform, vendor-neutral programming language that is ECMAScript. This includes the language syntax, semantics, libraries, and complementary technologies that support the language.

TC39表示技术委员会编号39。它是ECMA的一部分,ECMA是根据“ ECMAScript”规范对JavaScript语言进行标准化的机构。 它适用于通用,跨平台,与供应商无关的编程语言(即ECMAScript)的标准化。 这包括语言语法,语义,库以及支持该语言的补充技术。

TC 39致力于(TC 39 works on:)

  • Maintaining and updating the standard for the ECMAScript programming language.

    维护和更新ECMAScript编程语言的标准。
  • Identifying, developing and maintaining standards for libraries that extend the capabilities of ECMAScript.

    识别,开发和维护用于扩展ECMAScript功能的库的标准。
  • Developing test suites that may be used to verify correct implementation of these standards.

    开发可用于验证这些标准是否正确实施的测试套件。
  • Contributing with selected standards to the ISO/IEC JTC 1 committee.

    ISO / IEC JTC 1委员会贡献选定的标准。

  • Evaluating and considering proposals for complementary or additional technologies.

    评估并考虑有关补充或附加技术的建议。

Since ES6 came out, TC 39 streamlined the proposal previsioning process to meet modern expectations. The new process uses a superset of HTML to format the proposals. They use GitHub pull requests, which helped boost participation from the community. The number of proposals being made also increased.

自ES6发布以来,TC 39简化了提案预定义流程,以满足现代期望。 新流程使用HTML的超集来格式化建议。 他们使用GitHub拉取请求,这有助于提高社区的参与度。 提出的提案数量也有所增加。

The specification is now more of a living standard, meaning that proposals see adoption faster, and we don’t spend years waiting for a new edition of the specification to come out.

现在,该规范已成为生活水平的标准 ,这意味着提案可以更快地通过,并且我们无需花很多时间等待规范的新版本发布。

更一般的看法 (A more general view)

By reading the ECMAScript specification, you learn how to create a scripting language. By reading the JavaScript documentation, you learn how to use that scripting language.

通过阅读ECMAScript规范 ,您将学习如何创建 一种脚本语言。 通过阅读JavaScript文档 ,您将学习如何使用该脚本语言。

提案处理 (Proposal Processing)

阶段0:稻草人 (Stage 0: Strawman)

Any discussion, idea, change, or addition which has not yet been submitted as a formal proposal is considered to be a “strawman” proposal at this stage. Only members of TC39 can create these proposals, and there’s over a dozen active strawman proposals today.

在此阶段,尚未提交的任何讨论,想法,变更或补充都被视为“稻草人”建议。 只有TC39的成员才能创建这些建议,并且今天有十几个活跃的稻草人建议。

阶段1:提案 (Stage 1: Proposal)

At this stage, a proposal is formalized and expected to address cross-cutting concerns, interactions with other proposals, and implementation concerns. Proposals in this stage identify a discrete problem and offer a concrete solution to that problem.

在此阶段,提案已正式确定,有望解决跨领域关注,与其他提案的交互以及实施关注。 在此阶段的提案确定了一个离散的问题,并为该问题提供了具体的解决方案。

At this stage, proposal often includes a high level API description, usage examples, and a discussion of internal semantics and algorithms. These proposals are likely to change significantly as they make their way through the process.

在此阶段,建议通常包括高级API描述,用法示例以及内部语义和算法的讨论。 这些建议在整个过程中可能会发生重大变化。

阶段2:草稿 (Stage 2: Draft)

Proposals in this stage should offer an initial draft of the specification.

此阶段的提案应提供规范的初稿。

At this point, it’s reasonable for implementers to begin experimenting with actual implementations in runtime. The implementation could come in many forms: a polyfill, user code that mangles the runtime into adhering to the proposal, an engine implementation (which natively provides support for the proposal), or it could be support by a build-time compiler like Babel.

在这一点上,实现者开始在运行时中尝试实际的实现是合理的。 该实现可以有多种形式:polyfill,使运行时修改为遵守提案的用户代码,引擎实现(本机为提案提供支持),或者由Babel等构建时编译器提供支持。

第三阶段:候选人 (Stage 3: Candidate)

Proposals in this stage are candidate recommendations. At this advanced stage, the specification editor and designated reviewers must have signed off on the final specification. A Stage 3 proposal is unlikely to change beyond fixes to issues identified in the wild.

此阶段的建议是候选建议。 在此高级阶段,规范编辑者和指定的审阅者必须已经签署了最终规范。 第3阶段的提案除了解决野外发现的问题之外,不太可能改变。

Implementers should have expressed interest in the proposal as well — a proposal without support from implementers is dead in the water. In practice, proposals move to this level with at least one browser implementation, a high-fidelity polyfill, or when supported by a build-time transpiler like Babel.

实施者也应该对该提案表示兴趣-没有实施者支持的提案已经死了。 实际上,使用至少一个浏览器实现,高保真的polyfill或在像Babel这样的编译时编译器的支持下,投标书可以提高到这一水平。

阶段4:完成 (Stage 4: Finished)

Finally, proposals get to this stage when there are at least two independent implementations that pass acceptance tests.

最后,当至少有两个独立的实现通过验收测试时,建议才进入此阶段。

下一步是什么? (What’s Next?)

Proposals that make their way through to stage 4 will be included in the next revision of ECMAScript. When the spec goes through its yearly ratification as a standard, the proposal is ratified as part of it.

进入第4阶段的提案将包含在ECMAScript的下一个修订版中。 当规范通过其年度批准作为标准时,该提案将作为其一部分被批准。

This is how ideas for evolving the ECMAScript language are accepted and added to next revision of ECMAScript. And we are all thankful for the work done by TC39, which is invaluable.

这就是如何接受有关发展ECMAScript语言的想法并将其添加到ECMAScript的下一版本中的方法。 我们都感谢TC39所做的工作,这是无价的。

With that, we have reached the end of our discussion on TC39 and its contributions to ECMAScript.

这样,我们就结束了关于TC39及其对ECMAScript的贡献的讨论。

Thanks for reading.

谢谢阅读。

Sources: TC 39 Process, ECMA International

资料来源: TC 39流程ECMA国际组织

翻译自: https://www.freecodecamp.org/news/tc39-and-its-contributions-to-ecmascript-c178b77f32e1/

ecmascript

 类似资料: