Andreas Rossberg wrote:
There
also is the sloppy-mode-arguments-object vs destructuring issue.
Thanks, I forgot that one. It's a good point, since one cannot
statically catch all 'arguments' uses in general.
Years ago we implemented destructuring parameters in JS1.7-1.8, without
restricting arguments usage:
js> function f({x,y}, z) { arguments[0] = 42; return [x, y, z] }
js> f({x:1,y:2}, 3)
[1, 2, 3]
js> function f({x,y}, z) { arguments[1] = 42; return [x, y, z] }
js> f({x:1,y:2}, 3)
[1, 2, 42]
js>
If bad old sloppy arguments objects are really important to preserve in
functions that use destructuring, we can keep support.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss