What is the relation between ES6, ES7 (and bigger), ES2015, stage-0, stage-1 (and bigger)?

匆匆过客 提交于 2020-01-12 05:29:08

问题


I am lately confused between the following terms in articles about "new-ish" JavaScript:

  • ES6
  • ES7 (and sometimes, though rarely, ES8 and bigger)
  • ES2015 (and sometimes ES2016 and bigger)
  • stage-0 (and stage-1 and bigger)

It seems some of those are subset, feature-wise, of the others, but I am not quite clear on which are subsets of which.


回答1:


Fair enough, it is a bit confusing. :-)

The four-digit numbers are years, the others are specification editions.

ES2015 is ES6. It's short for ECMAScript 2015, which is the official name of the language, which is defined by the 6th edition of the specification (hence, "ES6"). From the spec:

Standard ECMA-262

6th Edition / June 2015

ECMAScript® 2015 Language Specification

Similarly, ES2016 is ES7:

Standard ECMA-262

7ᵗʰ Edition / June 2016

ECMAScript® 2016 Language Specification

2015 was the first time they put the year into the language name. The previous spec, 5.1 in 2011, was just the "ECMAScript® Language Specification". So you'll hear ES5.1 (published June 2011) ES5 (published December 2009) and ES3 (published December 1999). (There was no ES4.)

The stage-0, etc., refer to the stage of proposals to enhance the language, which are handled on this github page managed by the TC-39 committee responsible for the language. The enhancement process is laid out on this page from TC-39:

0 - Strawman

1 - Proposal

2 - Draft

3 - Candidate

4 - Finished

...and once it's at Stage 4, it'll be listed here along with the specification it's expected to be in. For instance, Async Functions have reached Stage 4 and will be in ES2017.




回答2:


The TC39 categorizes proposals into 4 stages:

  • stage-0 - Strawman: just an idea.
  • stage-1 - Proposal: this is worth working on.
  • stage-2 - Draft: initial spec.
  • stage-3 - Candidate: complete spec and initial browser implementations.
  • stage-4 - Finished: will be added to the next yearly release.

Also, check out the current TC39 proposals



来源:https://stackoverflow.com/questions/39078527/what-is-the-relation-between-es6-es7-and-bigger-es2015-stage-0-stage-1-an

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!