i18n API - resolvedOptions

Norbert Lindenberg ecmascript at norbertlindenberg.com
Fri Aug 31 09:16:28 PDT 2012


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.

Norbert


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 



More information about the es-discuss mailing list