Oliver Hunt (2014-04-25T17:25:55.000Z)
On Apr 25, 2014, at 4:24 AM, Andreas Rossberg <rossberg at google.com> wrote:

> The way destructuring assignment currently is specified leads to
> rather inconsistent evaluation order. Consider:
> 
>  let o = {}
>  function f() { print(1); return o }
>  function g() { print(2); return 5 }
> 
>  f().x = g()    // 1, 2
>  {a: f().x} = {a: g(}}   // 2, 1
> 
> That is, destructuring assignments violate the left-to-right
> evaluation that is otherwise maintained.
> 

I don’t believe that there is any reason to break from left-to-right evaluation order.  Even if it was uncommon it’s still an unnecessary hazard.

Spec bug maybe?

—Oliver
domenic at domenicdenicola.com (2014-05-01T22:59:55.058Z)
I don’t believe that there is any reason to break from left-to-right evaluation order.  Even if it was uncommon it’s still an unnecessary hazard.

Spec bug maybe?