[Issue 1989] opEquals should return bool

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 3 07:02:39 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1989


smjg at iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com




------- Comment #7 from smjg at iname.com  2008-09-03 09:02 -------
(In reply to comment #2)
> This was discussed in the main newsgroup at a later date, and it was shown
> there that the performance reasoning was outdated. Unfortunately I don't have
> the link handy.

Was there any "performance reasoning" for this particular case that was even
valid in the first place?

(In reply to comment #3)
> int areEqual(int op1, int op2)
> { return op1-op2; }

Uh, that doesn't even work.  Try it for yourself and see.

Yet more reasons that opEquals should return bool:
http://tinyurl.com/6p93a9


-- 



More information about the Digitalmars-d-bugs mailing list