Chrome Canary behaves similarly (with the difference that the Set
constructor can't convert an array), Olov reported an issue:
https://code.google.com/p/v8/issues/detail?id=3069

This is probably just code based on non-recent drafts as not equating
them would be bad for reasons Olov outlined in his post.

Why WeakMap/WeakSet continue differentiating between +0 and -0?

On Mon, Dec 23, 2013 at 1:11 AM, Rick Waldron <[email protected]> wrote:
>
>
>
> On Sun, Dec 22, 2013 at 6:41 PM, Mark S. Miller <[email protected]> wrote:
>>
>> No, Map and Set will equate -0 and +0.
>
>
> In SpiderMonkey's Set and Map:
>
>   var s = new Set([-0, +0]);
>   s.size; // 2
>
>   var m = new Map();
>   m.set(-0, 1);
>   m.set(+0, 2);
>
>   m.get(-0); // 1
>   m.get(+0); // 2
>
>
>
> Rick
>
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>



-- 
Michał Z. Gołębiowski
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to