Kevin Smith wrote:
Isn't there a name that we already use for alternative constructors: create?

    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.

/be

Kevin

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to