On Nov 6, 2011, at 10:01 AM, Axel Rauschmayer wrote:

>>> ...
> 
> 
> Very interesting. Still seems orthogonal to the decision whether or not to 
> coerce the rhs to array (whatever that means). If []= is considered an “array 
> operator” then coercion seems in line with how other operators behave.
> 
> If I wanted to ignore the length property, I would use:
>      let { 0: a, 1: b } = someValue
> 

This is pretty much my thinking too.  A programmer's choice to use  [ ]  
instead of {} the destructuring pattern means something. By choosing to use [ ] 
as the pattern they are expressing the intent to view someValue using "array 
element" access semantics. If they don't care about such things, they can use 
the { } pattern.

Allen




_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to