Shijun He (2013-12-18T09:52:28.000Z)
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.

It seems the thread is totally ignored...


On Tue, Aug 28, 2012 at 5:56 PM, Jussi Kalliokoski <
jussi.kalliokoski at gmail.com> wrote:

> On Tue, Aug 28, 2012 at 12:40 PM, Axel Rauschmayer <axel at rauschma.de>wrote:
>
>> However, I'm still not quite sure what the use case is for this. For code
>> generation, if you know how many elements there are and what they are
>> enough to put them in the Array.of(...,...,...) call, why not just use
>> [...,...,...]? Unless it's supposed to be used for converting array-likes
>> to arrays, where I really don't think this is the best function signature.
>> For the dart example, why not just use [] and you avoid the gotcha?
>>
>>
>> map and map-like scenarios are another use case:
>>
>> [1,2,3].map(Array.of)  // [[1], [2], [3]]
>>
>> But, as Domenic mentions, it does indeed compete with:
>>
>> [1,2,3].map(...x => [...x])
>>
>
> Yeah, and in that case (making every element of an array an array),
> actually:
>
> [1,2,3].map(x => [x])
>
> Which is even shorter.
>
> I really have a hard time seeing any value in having this feature. All the
> problems it's supposed to solve (at least the ones presented here) already
> have better solutions. :D
>
> Cheers,
> Jussi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131218/eefe07f1/attachment.html>
domenic at domenicdenicola.com (2014-01-03T16:45:31.318Z)
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.

It seems the thread is totally ignored...