Rev21 ES6 Draft now available

# Allen Wirfs-Brock (11 years ago)

PDFs and .doc file available at harmony:specification_drafts#november_8_2013_draft_rev_21

New in this revision:

  • Updated Module Syntax and static semantics
  • Scripts no longer may contain import statements
  • Specified how to determine if a call is in tail position
  • The call and apply functions now internally do tail calls to the target function
  • Tweaked the new operator so it will work in tail position
  • Eliminated the [[Invoke]] MOP operation
  • Calling the next method of an completed generator returns a “done” result instead of throwing
  • The length property of bound functions is now configurable/non-writable
  • Clarified requirements of String localeCompare when no language sensitive comparison support is available.
  • Tweaked the ordering of a few steps in Array.from to enable self-hosting using for-of
  • Added ToInt8 and similar abstract operation
  • Defined name property of %TypedArray% and the individual typed array constructors
  • Significant fixed to yield * evaluation semantics
  • Fixed handling of identifier ‘yield’ in generator function parameter lists
  • A little static semantic cleanup making sure that FunctionDeclarations and GeneratorDeclarations have the same top level scoping rules
# Andreas Rossberg (11 years ago)

I have a nit: would it possible to use international standard date format (YY-MM-DD) for the revision's file names? Then they would sort in a meaningful manner. :)

# Jason Orendorff (11 years ago)

Rev. 21 is now available in HTML at people.mozilla.org/~jorendorff/es6-draft.html.

As always, bug reports are greatly appreciated. Email me or file issues at jorendorff/es-spec-html.

# Rafael Weinstein (11 years ago)

Nit: 9.1.10 [[Delete]] (P)

Steps 5 & 6 should be steps 4a & 4b (lost an indent)

# Allen Wirfs-Brock (10 years ago)

At: harmony:specification_drafts#august_24_2014_draft_rev_27

  • Fixed scoping bug in for-of, catch clause, comprehensions WRT TDZ for iteration bindings. see bug: ecmascript#3011
  • For-in/for-of loop bodies can’t contain tail calls because of need to close the iterator on abrupt completion.
  • [[OwnPropertyKeys]] now returns a List rather than an Array
  • Tests of @@isRegExp are now based on ToBoolean(Get(obj, @@isRegExp)
  • Array find/findIndex no longer ignore array element holes.
  • Added %IteratorPrototype% that all built-in iterators inherit from.
  • Destructoring now performs ToObject on values to be destructured.
  • Array and generator comprehensions removed from language
  • Removed specification of Reflect.Realm
  • Object.assign ignores null and undefined source arguments
  • Added 16.1 that lists forbidden extensions.
  • Some editorial cleanup of Function.prototype.toString
  • Removed all explicit poison pill methods on functions (except for Function.prototype) and added 16.1 restrictions on such extensions.
  • String(aSymbol) now returns the symbol’s description. Does not change ToString(symbol) throwing ever where else.
  • aSymbol == Object(aSymbol) now is true, just like other wrapable primitives, see bug: ecmascript#3066
  • Tighten specification of when Array.prototype.sort is implementation defined
  • Revised @@unscopable semantics as per last TC39 meeting
  • Made it an error to reentrantly enter a generator via next/throw/return.
  • Further work on semantics of Generator return method in the context of yield*
  • The term “neutered” has been replaced with the term “detached”
  • Resolved bugs: 3142-3140, 3135-3133, 3131, 3128-3124, 3122-3120, 3117, 3115, 3111-3107, 3105, 3103-3098, 3096-3095, 3093-3092, 3090-3089, 3087-3082, 3080-3062, 3060-3016, 3012-3011, 3005, 2987, 2979, 2831, 2389, 2368, 1908, 523, 516, 513, 407, 91
# Jason Orendorff (10 years ago)

This is now available in HTML at: people.mozilla.org/~jorendorff/es6-draft.html

As always, please report any issues with the HTML version here: jorendorff/es-spec-html/issues and any issues with the document itself here: bugs.ecmascript.org

# Allen Wirfs-Brock (10 years ago)

The Rev 32, Feb. 2, 2015 ES 6 draft is now available at harmony:specification_drafts#february_2_2015_draft_rev_32

This draft contains the last of the planned design changes for ES6. From this point forward all changes should be bug fixes. There are some known cross-reference anomalies in this revision. Those will be corrected in the next revision.

Changes include:

  • Removed new super() syntax
  • new.target meta-property no longer highlighted as tentative.
  • Methods defined within class definitions are now non-enumerable
  • Classes defined as class extends null {...} are now consider to be derived classes
  • Constructors defined using class definition syntax throw when called as functions
  • Function.prototype.toMethod has gone away. Only class declarations and object literals can set a function's [[HomeObject]]
  • Object.prototype.toString no longer censors use of legacy [[Class]] values.
  • Empty object destructuring patterns without default values (eg, { }) throw if the value assigned to them is null or undefined. This make { } more consistent with the behavior of [ ].
  • Array destructoring performs an InteratorClose upon iterators it creates.
  • Fixed handling of throw and close methods received by a yield* (see bug ecmascript#3526) (further refinements may still be coming).
  • IteratorClose no longer cares whether the object returned from the return method has done:true.
  • Resolved bugs: 3723, 3721-3695, 3691-3688, 3686-3685, 3682-3680, 3678-3627, 3625-620, 3617-3608, 3606-3597, 3594-3581, 3579-3576, 3574, 3571-3563, 3561, 3558-3545, 3526, 3519, 3431, 3220, 3206
# Fabrício Matté (10 years ago)

So much awesomeness in this revision, congratz TC39!

# Brendan Eich (10 years ago)

Allen Wirfs-Brock wrote:

  • Function.prototype.toMethod has gone away. Only class declarations and object literals can set a function's [[HomeObject]]

I prefer to think of toMethod as "deferred", not "gone away" (taken to mean "for good" sometimes). ;-)

  • Object.prototype.toString no longer censors use of legacy [[Class]] values.

Yay!

  • Fixed handling of throw and close methods received by a yield* (see bug ecmascript#3526) (further refinements may still be coming).

s/close methods/return methods/

I like calling it close still, too :-P. My inner Pythonista talking.

  • Resolved bugs: 3723, 3721-3695, 3691-3688, 3686-3685, 3682-3680, 3678-3627, 3625-620, 3617-3608, 3606-3597, 3594-3581, 3579-3576, 3574, 3571-3563, 3561, 3558-3545, 3526, 3519, 3431, 3220, 3206

Great, looking forward to next draft and my red pen getting drained. Excelsior!