Boost logo

Boost :

From: Steven Robbins (steve_at_[hidden])
Date: 2023-02-20 03:50:45


On Sunday, February 19, 2023 5:08:45 P.M. CST Peter Dimov via Boost wrote:
> Gavin Lambert wrote:
> > (Also, can someone explain why x == y <==> y == x is controversial?

Thank you for asking this question, Gavin! It was the first thing I wondered
when I read the original post.

> > I have a hard time picturing a use case where you deliberately intend
these
> > to be non- commutative, outside of pathological library-fights.)
>
> Why is this "pathological"?

It breaks the idea that "==" is an equivalence relation, which seems to me to
unnecessarily complicate things for the user.

> If you allow heterogeneous comparisons, who
> decides the meaning of x == y, the author of x or the author of y?

As a user, I would hope/expect:

1. that I don't have to know or care that "x" and "y" are from different
authors
2. the two authors would agree on equivalence
 
-Steve




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk