>
>
> In the worst case, when I don't know if I have a string or an URLUtils
> object, I just ensure that at least one member of the equality operator is
> stringified—and, most importantly, that it is evident from reading my code
> that one member is stringified:
>
>     a.href == url
>     String(whatever) == url
>

Is an equality operator which requires one to remember such details a good,
dependable equality operator?  Does it really even express a meaningful
concept of "equality"?

Attaching more nuance on top of "==" via overloading seems like it will
make things worse, not better.

Brendan, can you provide a value class example which includes a
user-defined "=="?  I'd like to see it in context.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to