Equality Reform(ul)ation

Kevin Smith zenparsing at gmail.com
Wed Jan 15 13:28:56 PST 2014


>
>
>> js> 0L == { valueOf: function() { return 0 } }
>
> typein:2:0 TypeError: no operator function found for ==
>
>  Is the Object-type operand converted to a primitive before the overload
>> is matched?
>>
>
> No, the multimethod dispatch algorithm runs. Even with ToObject (I see I
> left that out), there is no predefined @@ADD or @@ADD_R on
> Object.prototype, so the error above is inevitable.


What's the method for determining whether we run the multimethod dispatch
algorithm versus the ES6 abstract equality algorithm?

Apologies if the answer is already out there.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140115/e665716b/attachment.html>


More information about the es-discuss mailing list