Sets plus JSON

Dean Landolt dean at deanlandolt.com
Wed Oct 3 11:44:40 PDT 2012


On Wed, Oct 3, 2012 at 2:19 PM, Rick Waldron <waldron.rick at gmail.com> wrote:

>
>
> On Wed, Oct 3, 2012 at 2:04 PM, Rick Waldron <waldron.rick at gmail.com>wrote:
>
>>
>>
>> On Wed, Oct 3, 2012 at 1:43 PM, Brandon Benvie <brandon at brandonbenvie.com
>> > 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
>
>
I image it looking something like [key1, value1, key2, value2...] -- index
% 2 implies values. Anything more would mean an awful lot of unnecessary
allocations. I don't see why this wouldn't be sufficient for the json form
as well, especially if the language had something like a take2 iterator.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121003/b18b887e/attachment.html>


More information about the es-discuss mailing list