Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add sorter API for completion candidates #915
Add an API for sorting completion candidates.
This can be a function that gets all candidates as inputs, and outputs an equal number of numbers, strings or lists. The outputs must be of the same type and are used for sorting the corresponding inputs.
The sorter is run separately for each different candidate type (#914).
I'm sure I'm misunderstanding something, because I don't think it's practical to have a function that receives all candidates and returns numeric values for all of them. This would mean that the function needs to establish a total "order value" over the whole list, essentially sorting the list in the process! The scalability of a sorting algorithm comes from the fact that you only need to be able to determine the order among two elements at a time.