Intent to Ship: Array grouping

145 views
Skip to first unread message

Shu-yu Guo

unread,
Jul 11, 2023, 1:33:29 PM7/11/23
to blink-dev

Contact emails

s...@chromium.org

Explainer

https://github.com/tc39/proposal-array-grouping/blob/main/README.md

Specification

https://tc39.es/proposal-array-grouping/

Summary

Adds news Object.groupBy(iterable, groupCallback) and Map.groupBy(iterable, groupCallback) to perform a grouping or bucketing operation. The Object method returns a plain object, where the groups are property keys. The Map method returns a Map, where the keys can be arbitrary values.



Blink component

Blink>JavaScript>Language

TAG review



TAG review status

Not applicable

Risks



Interoperability and Compatibility

Minimal. These are static methods on Object and Map, which are very unlikely to cause incompat. The previous Array.prototype version caused significant compat issues and the proposal was redesigned.



Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1739648)

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=234327)

Web developers: Strongly positive (https://twitter.com/rauschma/status/1470854996459769867?s=20&t=DDr_7gzapEKcfF2MbEVzHA)

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

This feature adds two new built-in Array.prototype methods, which are debuggable like all other built-in methods.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

In test262:
https://github.com/tc39/test262/tree/main/test/built-ins/Object/prototype/groupBy
https://github.com/tc39/test262/tree/main/test/built-ins/Map/prototype/groupBy

Flag name on chrome://flags

--harmony-array-grouping

Finch feature name



Non-finch justification

None

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/v8/issues/detail?id=12499

Estimated milestones

DevTrial on desktop100
DevTrial on Android100


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5714791975878656

Links to previous Intent discussions

Note that this is a new version of the proposal, redesigned after web incompatibility prevented shipping in the previous version and was unshipped by all the browsers. The previous I2S is here.



This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
Jul 11, 2023, 9:27:59 PM7/11/23
to Shu-yu Guo, blink-dev

LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAN-e9e94MKs3PgCqPG6E-7x_%2BfH8Z4AFLMC0Bva-dZrVBogKtA%40mail.gmail.com.

Yoav Weiss

unread,
Jul 12, 2023, 12:53:07 AM7/12/23
to Mike Taylor, Shu-yu Guo, blink-dev

Daniel Bratell

unread,
Jul 12, 2023, 2:56:36 AM7/12/23
to Yoav Weiss, Mike Taylor, Shu-yu Guo, blink-dev
Reply all
Reply to author
Forward
0 new messages