This old paper by Allen (and others) is probably the best I've seen at explaining the rationale for "static" methods — http://wiki.ecmascript.org/lib/exe/fetch.php?id=es3.1%3Aes3.1_proposal_working_draft&cache=cache&media=es3.1%3arationale_for_es3_1_static_object_methodsaug26.pdf
-- kangax On Tue, Dec 17, 2013 at 12:24 AM, Oliver Joseph Ash <[email protected]>wrote: > I'm noticing that many methods added in ES5 and due in ES6 are defined on > the type's constructor function instead of on the type's prototype. For > example, Object.keys, Object.defineProperty, and Array.isArray. > > Is there a reason these were not added to the prototype, i.e. > Object.prototype.keys, for consistency? > > Best, > Oliver > > > _______________________________________________ > 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

