Why does Object.opEquals *exist*

Stewart Gordon smjg_1998 at yahoo.com
Sun Nov 12 05:14:01 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

I'm still not convinced that there's any way that opEquals can be made 
more efficient by returning int instead of bool.

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- 
PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on 
the 'group where everyone may benefit.



More information about the Digitalmars-d mailing list