>
>
> In JS world we are "use to" compare via === so that when == is used
> instead we are usually in "power user land", I don't see any conceptual
> shenanigans in doing something like above code.
>
>
Only power users use "==" because it has weird conversion semantics that
are hard to internalize. "==" doesn't map to any simple relational
concept, certainly not "equality":
({}) == "[object Object]"; // true
So if a user is going to overload "==", are they going to maintain those
bizarre semantics? If so, then crazy-pants. If not, then it seems like we
have introduced a hazard into code that is generic with respect to the
types of operands to which "==" is applied. Sometimes crazy conversion
semantics, sometimes sensible equality semantics.
I'll stop there, because I don't know the details of the proposal.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss