About Array.of()

Shijun He hax.sfo at gmail.com
Mon Aug 27 15:29:19 PDT 2012

On Tue, Aug 28, 2012 at 1:55 AM, Rick Waldron <waldron.rick at gmail.com> wrote:
> I don't think that screenshots of search suggestions for a language feature
> that hasn't even been published is valid argument in this discussion.
> I'd also argue that these results support the current Array.of definition,
> eg.
> "I need to make an array of strings":
> Array.of( "A", "B", "C", "D" );
> ...Which returns an array of strings. Any example works, Array.of( things

You may miss that, only suggestions in English version of Bing have
many "-s". That means, most non-English (At least Chinese as my
screenshots) programmers won't think like that.

BTW, my Class.of(Type) choice come from VB.NET which use Class (of
Type) to denote generics.

> ... ) nicely describes what the function can be expected to do. As I noted
> earlier, I'm not opposed to Array.new(), but I maintain the position that it
> reads like backwards computer speak.

Maybe it like computer speak for native English speakers, but for me
and many programmers from non-English world, Array.new is much more
intuitive than Array.of .

Thank you.


More information about the es-discuss mailing list