ES5/ES6 methods on constructor functions instead of prototype

2013-12-16 Thread Oliver Joseph Ash
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.

Re: ES5/ES6 methods on constructor functions instead of prototype

2013-12-16 Thread Tab Atkins Jr.
On Mon, Dec 16, 2013 at 3:24 PM, Oliver Joseph Ash oliverj...@icloud.com 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

Re: ES5/ES6 methods on constructor functions instead of prototype

2013-12-16 Thread Benjamin (Inglor) Gruenbaum
in the 'application level'. We have `Map`s now :) Benjamin -- Forwarded message -- From: Oliver Joseph Ash oliverj...@icloud.com To: es-discuss@mozilla.org Cc: Date: Mon, 16 Dec 2013 23:24:31 + Subject: ES5/ES6 methods on constructor functions instead of prototype I'm noticing