Globalization API: Prototype objects
Norbert Lindenberg
ecmascript at norbertlindenberg.com
Tue Feb 7 10:27:38 PST 2012
The current specification of the ECMAScript Globalization API requires the prototype objects for the LocaleList, Collator, NumberFormat, and DateTimeFormat constructors to be objects constructed by these constructors themselves. This is following a pattern established in the ECMAScript Language Specification, which requires the Date prototype object to be a Date object, the RegExp prototype object to be a RegExp object, etc.
At the November TC 39 meeting, there were some comments that this is not the recommended pattern anymore. Instead, prototype objects should be minimal objects with just those properties (mostly methods) that all constructed objects should inherit.
Which way should the Globalization API go?
Regards,
Norbert
More information about the es-discuss
mailing list