Approach of new Object methods in ES5

Dmitry Soshnikov dmitry.soshnikov at gmail.com
Sat Apr 17 04:25:04 PDT 2010


On Fri, Apr 16, 2010 at 8:58 PM, Brendan Eich <brendan at mozilla.com> wrote:

>
> 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.
>
>
Excuse me, seems I missed something. I thought first that you mentioned them
in "private" viewpoint, but in this sentence you say that "names" will help
to place standard methods/properties in built-ins prototypes avoiding naming
collisions. But how will it look? Can you show an example, it is very
interesting. If you e.g. place "getPrototype" "name" into "Object.prototype"
how will it help to avoid collisions if user will place "string property"
"getPrototype" into the "Object.prototype" (or just in global object)? How
will it help for "object detection"?

Dmitry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20100417/55583ae9/attachment.html>


More information about the es-discuss mailing list