Allen Wirfs-Brock (2013-10-18T20:10:50.000Z)
On Oct 18, 2013, at 12:24 PM, BelleveInvis wrote:

> ...this causes an inconsistency that in expression `[f().x] = [g()]`, g is called BEFORE f. That is weird, and differ from `f().x = g()` where g is called after f.

but consider
   [f().x, h().y] = g();  //assume g() evaluates to an array-like object (and intentionally removed the RHS array literal)
even if evaluation of the RHS was delayed until after evaluating the first LHS element, g() would still be evaluated before h().  You might consider  evaluating all of the LHS elements to References before evaluating the RHS.  That could require accumulating an arbitrary large number of pending References and it wouldn't work for object destructurings.  For example:

{x:  f().x=_=>{throw "no x"}(),  h().y} = getPoint();

Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131018/09dae847/attachment.html>
domenic at domenicdenicola.com (2013-10-23T21:29:48.142Z)
On Oct 18, 2013, at 12:24 PM, BelleveInvis wrote:

> ...this causes an inconsistency that in expression `[f().x] = [g()]`, g is called BEFORE f. That is weird, and differ from `f().x = g()` where g is called after f.

but consider

```js
[f().x, h().y] = g();  //assume g() evaluates to an array-like object (and intentionally removed the RHS array literal)
```

even if evaluation of the RHS was delayed until after evaluating the first LHS element, `g()` would still be evaluated before `h()`.  You might consider  evaluating all of the LHS elements to References before evaluating the RHS.  That could require accumulating an arbitrary large number of pending References and it wouldn't work for object destructurings.  For example:

```js
{x:  f().x=_=>{throw "no x"}(),  h().y} = getPoint();
```