Title: Intent to Implement: Intl.NumberFormat Unified API Proposal <https://github.com/sffc/proposal-unified-intl-numberformat>
Contact emails ft...@chromium.com, s...@chromium.com Explainer https://github.com/tc39/proposal-unified-intl-numberformat https://tc39.github.io/proposal-unified-intl-numberformat/section11/numberformat_diff_out.html https://tc39.github.io/proposal-unified-intl-numberformat/section6/locales-currencies-tz_diff_out.html Design doc/Spec https://goo.gl/ZAtL1f Summary Improves Intl.NumberFormat by adding support for measurement units, currency and sign display policies, and scientific and compact notation. Motivation There are many requests for adding number-formatting-related features to ECMA-402 for Intl.NumberFormat. These features are important to both end users and to websites. Since most of these features require carrying along large amounts of locale data for proper i18n support, exposing these features via a JavaScript API reduces bandwidth and lowers the barrier to entry for i18n best practices. Rather than complicate Intl with more constructors with heavily overlapping functionality, this proposal is to restructure the spec of Intl.NumberFormat to make it more easily support additional features in a "unified" way. Risks Interoperability and Compatibility This API change the pre-existing Intl.NumberFormat API by adding new options to control the formatted output. It is advanced to TC39 Stage 3 in the end of Oct 2018. Ergonomics The implementation depend on newer ICU class LocalizedNumberFormatter class, which require us to switch from the old NumberFormat. The switching in cl 1392233 <https://chromium-review.googlesource.com/c/v8/v8/+/1392233> speed up the Intl.NumberFormat constructor x4 in speed. During the prototype phrase we identify a size increase issue of this proposal and work with the ECMA402 committee to reduce the scope of the number of “units” supported in the proposal. Activation Web developers could use the API immediately upon our shipment, based on the usage of previous well supported Intl.NumberFormat object. Debuggability Nothing special. 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 <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md> ? Tests under tc39/test262 will includes many tests to test this API. Under test262/tree/master/test/intl402/NumberFormat <https://github.com/tc39/test262/tree/master/test/intl402/NumberFormat> Link to entry on the feature dashboard <https://www.chromestatus.com/> https://www.chromestatus.com/feature/5430420699086848 Requesting approval to ship? “No”. The feature is behind a runtime flag harmony_unified_intl_numberformat and I will later send an Intent to Ship <https://docs.google.com/a/chromium.org/document/d/1EyRTYnF2bmgqwYQQTDs2R2BT3ZSx29iPCFKTQiS_37o/edit> email when I am ready to enable by default. -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAOcELL9%3Dc1CE5DD8K9K5nHC-JERy5S7WZmO%2Bt7eoxyhvPJoMFg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.