Closed
Description
The sort functions currently require a pure comparison function. Is this actually required?
For example, I need to be able to sort the results of a query where the results are not always orderable. If the comparison functions are allowed to be impure then I can add a err: @mut ~str
argument to my function and see if it is set when the sort finishes. But if purity is required then I'll need to do a pass before the sort which is a) duplicating a traversal that sort has to do anyway and b) very inefficient (especially given that queries can have lots of results).
Metadata
Metadata
Assignees
Labels
No labels