Le 03/01/2022 à 17:12, Larry Garfield a écrit :
Also, people keep talking about edge cases. In my experience, "are these two objects equal" (for some object-specific definition of equal) is very much *not* an edge case. I may have less use for overloading % as I don't use advanced math that much, but I compare things all the frickin' time and that would be incredibly useful day to day.
I forgot to answer to that, specifically. I'd much more prefer to have an explicit `equals(object $other): bool` (magic or not, really I do not care) single method for equality only, that'd be great. In that sense, I much preferred specific RFC about `__equalsTo()` or `__compareTo()` alone that a huge generic operator overload RFC. I think both could actually be separated, it wouldn't be that weird.
Best regards, -- Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php