https://bugzilla.wikimedia.org/show_bug.cgi?id=53241

--- Comment #6 from Gabriel Wicke <[email protected]> ---
(In reply to comment #5)
> The standard thunk is something like:
> 
> function Map() { this.store = Object.create(null); }
> Map.prototype.get = function( k ) { return this.store['$'+k]; }
> Map.prototype.set = function( k, v ) { this.store['$'+k] = v; }

This is basically what harmony-collections does for primitive keys when native
maps are not available. It also implements the full spec, which is good for
consistency even if we don't need objects as keys right now.

> So, sure we should use safer maps where needed, but it probably doesn't have
> to
> be a hugely-invasive patch set.

Yup, only where users pass in arbitrary keys for new items, as I noted in
comment #1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to