Maybe some new API, like `createPrototypeModified(obj, newPrototype)`, it
copies all eigen-properties of `obj` to a new object with its prototype is
`newPrototype`.
From: infinte.c...@hotmail.com
To: es-discuss@mozilla.org
Subject: Is __proto__ ready
I think that once an object is created, its prototype should be constant.
While many people would fully agree with you, standardizing __proto__ isn't
about whether it is *needed*, but about it being out in the wild and TC39's
desire to let the EcmaScript standard reflect reality. Which, you
On Mon, Jun 10, 2013 at 5:06 AM, BelleveInvis infinte.c...@hotmail.comwrote:
I think that once an object is created, its prototype should be constant.
And we should add features to implement sub-typing built-in types, like
Array, since this code exists (found in Zepto):
Classes offer
Object.setPrototypeOf is really needed.
Use cases for that are as rare as for eval, but exist and are valid.
Currently I work on database engine written in JavaScript, and rely quite
heavily on __proto__.
Once I was asked By David Herman to explain my use cases. I prepared
following gist then:
On Mon, Jun 10, 2013 at 10:50 AM, medikoo
medikoo+mozilla@medikoo.comwrote:
Object.setPrototypeOf is really needed.
From the meeting notes:
Conclusion: __proto__ is an accessor on Object.prototype. The setter
mutates [[Prototype]]. There is no “poison pill”. We will provide both
yep, that's awesome ... too bad not a single engine exposed yet such easy
change ever for both V8 and/or SpiderMonkey since everything is already in
place, only the public method exposed to JS is missing (and for V8 I've
already porposed a patch to drop the poison pill but nothing happened ...)
I
6 matches
Mail list logo