Re: [RFC] [VOTE] User-defined object comparison
| From: | Côme Chilliet | Date: | Wed, 11 Jul 2018 07:59:46 +0000 |
| Subject: | Re: [RFC] [VOTE] User-defined object comparison | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-102745@lists.php.net to get a copy of this message | ||
> $x->__equals($y) && $y->__equals($z) requires that $x->__compareTo($z) be
> *TRUE*.
Typo here, it should be __equals at the end not __compareTo.
> In fact, returning 0 in __compareTo for undefined natural ordering leads to all kinds of
> strange behaviour
If this is the case, I do not understand why you split comparison and equality, as I understood it
at first the point was exactly to be able to have ordering equality without having value equality.
If this leads to strangeness, why allow it?
Côme
Attachment: [application/pgp-signature] This is a digitally signed message part. signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part. signature.asc