Why does Object.opEquals *exist*
Bill Baxter
wbaxter at gmail.com
Thu Nov 9 04:34:56 PST 2006
Anders F Björklund wrote:
> Kristian Kilpi wrote:
>
>> So the original question remains: why 'opEquals' returns int?
>
>
> Walter says it is for performance reason, when e.g. sorting...
>
> http://www.digitalmars.com/d/archives/digitalmars/D/bugs/7933.html
>
> --anders
Thanks for the link. Not sure how it matters when sorting, because then
you'd be using opCmp. I'd certainly find the performance argument more
convincing with some actual performance measurements to back it up, but
oh well. Much bigger fish to fry out there than the return value of opCmp.
--bb
More information about the Digitalmars-d
mailing list