D-Programming-Language/druntime — pull request #913 by andot (2014-07-26 04:23:15+00:00)
Title: Modified opCmp & toHash for AA

I know in the long run, we intend to remove `opEquals`, `opCmp`, `toHash`, and `toString` from `Object`. But if we don't want remove those functions now, I hope they should work well now, not in the far future. I don't think everyone want or can redefine (override) opCmp and toHash in the derived type. For example: When I write a serialize program, I need to store every object as a key in the AA for fast finding references, but the class of the object is not what I defined, so it is out of my control. In this case, we really need a default opCmp and toHash of object.