Globalization API discussion

Nebojša Ćirić cira at google.com
Thu Nov 17 14:22:04 PST 2011


>
> 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 - http://pastebin.com/pjfdKYss
>
>
Would converting constructors into factories help make API less Java like?

For example, instead of:

var dtf = new DateTimeFormat(...);

we have

var dtf = createDateTimeFormat(...);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111117/ed8c5840/attachment.html>


More information about the es-discuss mailing list