On Friday, 25 July 2014 at 07:21:11 UTC, Daniel Murphy wrote:
"Walter Bright" wrote in message news:[email protected]...

Determining an ordering can sometimes be more expensive. It is, after all, asking for more information.

It could also be significantly cheaper, if only a subset of fields need to be compared.

If that's the case, then the default opEquals isn't correct, and the programmer should have already defined opEquals. If they didn't, then their code is broken, and I see no reason to penalize the folks who wrote correct code just to fix someone else's broken code by then defining opEquals in terms of opCmp.

- Jonathan M Davis

Reply via email to