Approach of new Object methods in ES5
brendan at mozilla.com
Fri Apr 16 10:07:10 PDT 2010
On Apr 16, 2010, at 12:58 PM, Brendan Eich wrote:
> However, ES5 *does* allow libraries to bind non-enumerable
> properties of prototype objects. This is half of the solution, and
> if the prototype in question is Object.prototype, or perhaps even
Oops, missing "not": "... if the prototype in question is not
Object.prototype, or perhaps even then...."
> then if the name is obscure enough, a library might risk breaking
> object detection on that name in the global object.
> Another Harmony idea: http://wiki.ecmascript.org/doku.php?id=strawman:names
> for unforgeable property names not equated to any string. These
> cannot collide, and with sugar to let them be used with . (not only
> in computed property accesses using ), we may have a complete
> solution for injecting new "names" into standard prototypes without
> breaking existing code.
Comments welcome on the names proposal. There are open issues at the
bottom, and the "private" keyword syntax is straw for sure, although
we don't have a better proposal AFAIK.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss