i18n API - resolvedOptions

Domenic Denicola domenic at domenicdenicola.com
Fri Aug 31 09:19:08 PDT 2012

For comparison, quite a lot of ECMAScript function names are nouns, e.g. Date.now, String.prototype.{substring, indexOf}, etc.

From: Norbert Lindenberg
Sent: ‎August‎ ‎31‎, ‎2012 ‎12‎:‎16
To: Marcos Caceres
CC: es-discuss
Subject: Re: i18n API - resolvedOptions

Actually, all options have to be resolved in the constructors, because the functions returned by the compare and format getters also depend on the results of the resolution process. resolvedOptions() just packages up the results in a new object and returns that.

A correct description in verb form would be getResolvedOptions, but that's yet longer.


On Aug 31, 2012, at 5:31 , Marcos Caceres wrote:

> Hi,
> This is a bit of bike shedding.... Currently, the spec defines "resolvedOptions" - which is using a noun for a function name. Generally speaking, nouns should not be used as function names, only for attributes/getters.
> I would urge the function be renamed to "resolveOptions()". Dropping the "d" makes it a verb and gives the operation a sense of active-voice immediacy. I think that more accurately reflects what the method call does (it resolves the options on call and returns you an object) VS returning a set of options that were resolved in the past.
> Kind regards,
> Marcos

es-discuss mailing list
es-discuss at mozilla.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120831/18b375fb/attachment-0001.html>

More information about the es-discuss mailing list