Globalization API discussion

Nebojša Ćirić cira at
Thu Nov 17 10:44:09 PST 2011

Pastebin may be better for showing syntax -

17. новембар 2011. 10.33, Nebojša Ćirić <cira at> је написао/ла:

> Hi all,
>  there were couple concerns yesterday about the API (some concrete, some
> vague), and we would like to resolve those as soon as possible. Here is the
> list of issues I got yesterday (I am sure there's more we didn't manage to
> cover):
> Q. We need a way to set default locale (per context). Currently one can
> only read its value by constructing LocaleList without parameters.
> A. A global defaultLocale (attached to Globalization namespace) was
> proposed. I agree with the idea.
> Q. Move LocaleList parameter in all constructors to options parameter.
> A. This would help avoid putting "undefined" as first parameter if we are
> happy with the defaults.
> Q. API is too Java like. Use shorthand to invoke formatters.
> A. I would like to hear proposals on how to make it more JS like. Adding
> shorthand syntax is easy, but most of TC39 members were against having 2
> ways of doing things first time we proposed it.
> Here is an example of current API in action -
> Q. We don't use option parameter like that in JS (see previous point for
> actual example)
> A. What is a proper way of passing variable list of parameters that lets
> you extend the list in the future in an easy way? All of the properites in
> the options object are optional (with some exceptions)
>  Feel free to start a new email thread for hot topics.
> --
> Nebojša Ćirić

Nebojša Ćirić
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list