www.digitalmars.com         C & C++   DMDScript  

D - Sort the array of objects

I found if I sort an array of objects, like:

Object[] array;
array ~= new Object;
array ~= new Object;
.....

array.sort;

Them will be sorted by address of object.
Why not sort them by overloaded operator Object.cmp() ?
Aug 20 2003