Why we need to clean up __proto__

John Tamplin jat at google.com
Wed Dec 28 08:50:08 PST 2011

On Wed, Dec 28, 2011 at 11:39 AM, John-David Dalton <
john.david.dalton at gmail.com> wrote:

> As for the issue of using objects as dictionaries you can simply
> prefix keys with some unique value, `var uid = 'uid' + (+new Date);`,
> and then access entries like `dict[uid + key]`. This will allow value
> lookups to work correctly cross-browser regardless of ES5+ or
> __proto__ support.

At the expense of creating lots of garbage and slowing things down.

John A. Tamplin
Software Engineer (GWT), Google
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111228/c8f1a14d/attachment.html>

More information about the es-discuss mailing list