Rick Waldron wrote:
On Wed, Oct 3, 2012 at 2:04 PM, Rick Waldron <[email protected]
<mailto:[email protected]>> wrote:
On Wed, Oct 3, 2012 at 1:43 PM, Brandon Benvie
<[email protected] <mailto:[email protected]>> wrote:
Another options for Maps is to represent them as an array of
[key, value].
Which is a rough approximation of what a Map looks like internally.
Sorry, this is incorrect. Map looks more like:
[key1, key2]
[value1, value2]
Sorry for confusion
As an implementation in ES5, maybe (O(n) lookup cost). But the thing to
aim for is the shape of the Map parameter, and that looks like
[[key1, value1], [key2, value2]]
Still need type tagging to revive as a Map, of course.
JSON object notation can't handle Map, though: key can be any value
(ignore JSON not handling all JS values).
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss