destructuring: as patterns?

Andreas Rossberg rossberg at
Thu Apr 19 02:35:29 PDT 2012

On 19 April 2012 00:45, Allen Wirfs-Brock <allen at> wrote:
> On Apr 18, 2012, at 2:48 PM, Brendan Eich wrote:
>> David Herman wrote:
>>> *Please*, let's do this right.
>> This says to me (what I originally expected) that duplicate property name at any ply in an object pattern should be an early error.
>> Anyone disagree?

I wholeheartedly agree.

> I'm not sure that the concern about repeated side-effects is very significant given that any property access can have arbitrary side-effects including adding and removing properties from the RHS object.

I agree with that, too, though my impression is that implementations
already get the exact sequences of such observable steps wrong in
quite a few other cases (I played around with corner cases when doing
proxies). The case above looks easy enough, but in general, the fewer
possible micro observations the better.


More information about the es-discuss mailing list