brendan at mozilla.org
Mon Aug 27 12:12:56 PDT 2012
Kevin Smith wrote:
> Isn't there a name that we already use for alternative constructors:
> let object = Object.create(null);
> let array = Array.create("A", "B", "C");
If only create weren't used for Object.create, which takes a pdmap as
second parameter. That is a complicated beast, with the wrong defaults
for writable configurable and arguably enumerable.
The Ruby precedent for Array.new appeals to me (and I'm not a Rubyist).
I could live with Array.of but even ignoring search-engine usability,
using a preposition for a constructor name, rather than a verb or a
verb'ed adjective, counts against it a tiny bit IMHO.
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss