On Wed, May 18, 2011 at 6:35 PM, Nebojša Ćirić <c...@google.com> wrote:
> 4. Should we rename LocaleInfo.*collator*()/*numberFormat*()/* >> dateTimeFormat*() into LocaleInfo.*createCollator*()...? It makes it >> clear we are creating new object. >> >> >> The methods on the LocaleInfo constructor or are they really >> LocaleInfo.prototype methods. In other words are the results derived from a >> specific LocaleInfo instance or is the result some sort of global value that >> is independent of the instances. If the latter, why are they associated with >> the LocaleInfo constructor? >> > > They are prototypes: > > LocaleInfo.prototype.collator() > > I propose > > LocaleInfo.prototype.createCollator() > > since they actually create a new LocaleInfo.Collator (or DateTimeFormat or > NumberFormat) objects based on that locale info. > Are they required to create new instance, or can they return a cached object that uses the same parameters? If the latter, then I would suggest either foo() or getFoo() rather than createFoo(). -- John A. Tamplin Software Engineer (GWT), Google
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss