| |
| | The Joel on Software Discussion Group - Most Egregious Abuse of Operator Overloading? (Site not responding. Last check: 2007-10-18) |
 | | You may overload the operator to be a different equivalence relation (for example, case-insensitive string comparison), but your overload makes no sense if you violate one of the rules of an equivalence relation. |
 | | On the contrary, "Equivalence relations" are universally agreed to have the properties of reflexivity (for all A, A=A), symmetry (for all A and B, A=B <=> B=A), and transitivity (for all A, B and C, A=B and B=C => A=C). |
 | | The left-hand-side of the assignment operator has a pointer to the interface implemented by the object on the right-hand-side, and has incremented the reference count on said object to reflect this. |
| discuss.joelonsoftware.com /?joel.3.135764.68 (5297 words) |
|