The compiler _never_ defines opCmp for you. You have to do that yourself. So, what you're suggesting would force people to define opEquals just because they defined opCmp unless they wanted to take a performance hit <<<<<<<< in the rare case that it actually matters >>>>>>>>>>. And once you define opEquals, you have to define toHash. So, what you're suggesting would force a lot more code to define toHash, which will likely cause far more bugs than simply requiring that the programmer define opEquals if that's required in order to make it consistent with opEquals.
"Jonathan M Davis" wrote in message
news:[email protected]...
- Re: WAT: opCmp and opEquals woes Walter Bright via Digitalmars-d
- Re: WAT: opCmp and opEquals wo... Regan Heath via Digitalmars-d
- Re: WAT: opCmp and opEqual... H. S. Teoh via Digitalmars-d
- Re: WAT: opCmp and opEqual... Tobias Pankrath via Digitalmars-d
- Re: WAT: opCmp and opE... Tobias Pankrath via Digitalmars-d
- Re: WAT: opCmp and opEqual... via Digitalmars-d
- Re: WAT: opCmp and opE... H. S. Teoh via Digitalmars-d
- Re: WAT: opCmp and opE... via Digitalmars-d
- Re: WAT: opCmp and opEqual... Walter Bright via Digitalmars-d
- Re: WAT: opCmp and opEquals woes Jonathan M Davis via Digitalmars-d
- Re: opCmp and opEquals woes Daniel Murphy via Digitalmars-d
- Re: opCmp and opEquals woe... Jonathan M Davis via Digitalmars-d
- Re: opCmp and opEquals... Jacob Carlborg via Digitalmars-d
- Re: opCmp and opE... Manu via Digitalmars-d
- Re: opCmp and opE... Walter Bright via Digitalmars-d
- Re: WAT: opCmp and opEquals wo... Daniel Gibson via Digitalmars-d
- Re: WAT: opCmp and opEqual... Jonathan M Davis via Digitalmars-d
- Re: WAT: opCmp and opEquals wo... Jacob Carlborg via Digitalmars-d
- Re: WAT: opCmp and opEquals woes Walter Bright via Digitalmars-d
- Re: WAT: opCmp and opEquals woes Jacob Carlborg via Digitalmars-d
- Re: WAT: opCmp and opEquals wo... Walter Bright via Digitalmars-d
