Rick Waldron (2013-12-18T16:08:01.000Z)
On Wed, Dec 18, 2013 at 7:33 AM, Benjamin (Inglor) Gruenbaum <
inglor at gmail.com> wrote:

> From: Shijun He <hax.sfo at gmail.com>
> Subject: Re: About Array.of()
>
> > This is an old thread which I like to mention again. The proposal is
> change the method name from Array.of() to Array.fromElements() to make it
> clear especially for non-English native programmers.
>
> `Array.of` sounds a lot more expressive than `.fromElements` to me.
>

Agreed.

Additionally, `fromElements` will also be confusing when the new DOM
`Elements` API arrives: http://dom.spec.whatwg.org/#elements



> Optimally I'd like the array constructor to just accept a collection and
> convert it to an array but that's not going to happen. Would you mind
> explaining the issue here for non native English speakers?
>

The specification reads:

  Array.of(...items)

Which, when said out loud is:

  "Array of items"

I don't know how much clearer that can get. Bikeshedding the name of an API
at this stage in ES6's progress is not a valuable use of anyone's time.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131218/a93e6dd5/attachment.html>
domenic at domenicdenicola.com (2014-01-03T16:46:36.893Z)
On Wed, Dec 18, 2013 at 7:33 AM, Benjamin (Inglor) Gruenbaum <inglor at gmail.com> wrote:

> `Array.of` sounds a lot more expressive than `.fromElements` to me.

Agreed.

Additionally, `fromElements` will also be confusing when the new DOM `Elements` API arrives: http://dom.spec.whatwg.org/#elements



> Optimally I'd like the array constructor to just accept a collection and
> convert it to an array but that's not going to happen. Would you mind
> explaining the issue here for non native English speakers?

The specification reads:

```js
Array.of(...items)
```

Which, when said out loud is:

  "Array of items"

I don't know how much clearer that can get. Bikeshedding the name of an API
at this stage in ES6's progress is not a valuable use of anyone's time.