About Array.of()

Maciej Stachowiak mjs at apple.com
Mon Aug 27 23:59:23 PDT 2012


On Aug 26, 2012, at 4:30 PM, Brendan Eich <brendan at mozilla.com> wrote:

> Rick Waldron wrote:
>>> But Array.of is not. Maybe Array.new is a good name.
>> Array.of is unambiguous with the current ES specification
> 
> Array.new is ok too, though -- no problem with a reserved identifier as a property name. It's darn nice for Rubyists.

Another possibility is Array.create, following the pattern of Object.create. "of" seems like a funky name for a constructor, to my taste.

Cheers,
Maciej


More information about the es-discuss mailing list