Destructuring and evaluation order
dherman at mozilla.com
Tue Apr 29 11:59:14 PDT 2014
On Apr 25, 2014, at 10:42 AM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> Nope, it's always been designed this, going back to the original wiki strawman http://wiki.ecmascript.org/doku.php?id=harmony:destructuring#semantics and I assume the original FF implementation.
> It has also been something that we has been discussed here and in TC39 multiple times. If we wan to revisit this decision we really need to dredge up all of those previous discussions to see if there is new data that would cause us to change this decision.
> Basically for destructing assignment, each property element can be an arbitrary assignment expression and all of their Reference values would have to be saved to get left to right order.
FWIW (not much probably) I've always agreed with what Andreas and Ollie are saying here, but I don't have the time or energy to do the dredging. :)
More information about the es-discuss