Intent to ship: change-array-by-copy

95 views
Skip to first unread message

Tim Chevalier

unread,
Mar 20, 2023, 5:42:44 PM3/20/23
to dev-pl...@mozilla.org

As of 3/31/2023, I intend to submit a pull request to turn the change-array-by-copy feature on by default. It has been developed behind the javascript.options.experimental.enable_change_array_by_copy preference. It is shipping unflagged in Safari/JavaScriptCore and Chrome/v8.

The change-array-by-copy JavaScript feature introduces four new methods on Arrays and TypedArrays that do non-destructive transformations on arrays (returning a copy of the array). Code examples can be found at https://github.com/tc39/proposal-change-array-by-copy . The proposal is complete and has been merged into the ECMAScript spec ( https://github.com/tc39/ecma262/pull/2997 )

The tracking bug for shipping this feature unflagged to Nightly is https://bugzilla.mozilla.org/show_bug.cgi?id=1811057

I don't think a previous "intent to prototype" email was sent. As far as I know, this feature doesn't require any special DevTools support; I'm also not aware of any security or privacy concerns. Tests for each of the four new methods (toReversed, toSorted, toSpliced, and with) are included in test262. ( https://github.com/tc39/test262/tree/main/test/built-ins/Array/prototype and https://github.com/tc39/test262/tree/main/test/built-ins/TypedArray/prototype ).

Thanks,

Tim

Reply all
Reply to author
Forward
0 new messages