Implement ES6 destructuring binding and assignment.
The implementation will proceed in V8 under the --harmony-destructuring flag.
Owners: Andy Wingo (
wi...@igalia.com), Dmitry Lomov (
dsl...@chromium.org)
# TC39 acceptance
Destructuring binding and assignment have been in ES6 for a year or so
now, and have seen very few changes over the past months.
There was a minor change in the last meeting in which a ToObject call
was added to all binding right-hand-sides, so some things may yet
change, though all indications are that the spec is stable.
# Interest from other vendors
Firefox currently ships ES6 destructuring, and WebKit has an
implementation that has not shipped yet in release (that I am aware of).
Both Firefox and WebKit's implementations are incomplete and lag behind
the specification: they do not support default value initializers, they
do not correctly use the iterator protocol when destructuring to array
patterns, and they do not support rest patterns. Firefox is currently
working on fixing this
(
https://bugzilla.mozilla.org/show_bug.cgi?id=1055984).
IE has not shipped, but has stated intent to implement.
# Technical considerations
Design document:
https://docs.google.com/document/d/1iJWvuakeKsPJOeA-RJ-4bM3Jha5iewQjxKsylgzHEB0