[phobos] Issue with opEquals(Object, Object)
Steve Schveighoffer
schveiguy at yahoo.com
Tue Apr 27 15:40:15 PDT 2010
----- Original Message ----
> From: Andrei Alexandrescu <andrei at erdani.com>
> On 04/27/2010 04:57 PM, Steve Schveighoffer wrote:
> > In fact, I would
> > posit that unless lhs.opEquals and rhs.opEquals
> > point to the exact same
> > function, transitivity can be unwittingly
> > broken. Actually, you
> > could use this check instead of checking the
> > typeinfos are equal when
> > determining if you can call just one
> > function because it covers more
> > ground.
>
> Good point. So now it looks like opEquals is too flexible, not
> too inflexible :o).
Well, this was not my point. My point was that transitivity is not always essential, and there is no way to test for it.
However, if the default will ever call one function, there may be room for improvement. I'll see if I can come up with something that does not interfere with Object.opEquals but allows more control when needed.
-Steve
More information about the phobos
mailing list