The sorting of Tuples

sort

#1

If I have an array of tuples, all of type Tuple{Int, X, X} where X is any other type. When I sort them with julia’s sort! api, can I rely on it to sort them by the first Int (I want the first Int to be treated as a rank)?


#2

Yes.


#3

Although note that if you have any identical integers, then it’ll try to compare the next object(s) and sort on those.


#4

This really needs to be documented: https://github.com/JuliaLang/julia/issues/24330