I don't see a good reason why to mangle with this.
Note that you can achieve this behavior without breaking backwards 
compatibility with ES6 Proxies:

```js
class MyArray extends Array {
        constructor(...args) {
                super(...args);
                function computeProperty(target, property) {
                        const index = +property;
                        return index < 0 ? String(target.length + index) : 
property;
                }
                return new Proxy(this, {
                        get(target, property, receiver) {
                                return Reflect.get(target, 
computeProperty(target, property), receiver);
                        },
                        set(target, property, receiver) {
                                return Reflect.set(target, 
computeProperty(target, property), receiver);
                        }
                });
        }
}
```

On Montag, 18. April 2016 09:59:15 CEST /#!/JoePea wrote:
> Backwards compatibility has been broken before. I don't think this one
> is too bad of a breakage.
> 
> On Sun, Apr 17, 2016 at 9:48 PM, Biju <[email protected]> wrote:
> > On 17 April 2016 at 17:29, Frankie Bagnardi <[email protected]> wrote:
> >> That would break backward compatibility;
> >>
> >> ```js
> >> var a = ['a'];
> >> a['-1'] = 'test';
> >> Object.keys(a) // ['0', '-1']
> >> ```
> >
> > Do we have statistics how many sties depend on that?
> > _______________________________________________
> > es-discuss mailing list
> > [email protected]
> > https://mail.mozilla.org/listinfo/es-discuss
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
> 
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to