On Wed, Jan 7, 2015 at 4:08 PM, Keean Schupke <[email protected]> wrote: > SortBy should not exist. By defining sort on a partial order, there is only > one sort direction. > > The other part, how to sort a composite object by different properties seems > best handled by wrapping the object in a view. In other words PeopleByAge is > a different type than PeopleByHeight and these would override 'less than' on > the object. In fact People should not be sortable as it is ambiguous. > > To do this for runtime data just requires an existential wrapper, which of > course makes explicit the need for runtime polymorphism.
In other words, if we have an array of ints, and a function int -> int, generating a key we should turn it into an array of (int, int -> int) pairs before sorting? Geoffrey _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
