in reply to Re^2: Sort mechanics problems ...
in thread Sort mechanics problems with objects and potentially contradicting comparisons (would cause infinite loop)

...But, as you've discovered, it's not actually that simple. Another issue is that you'll need a stable sort algorithm for this to work (see the sort pragma). We're trying to tell you that sort is really not the right tool for this job.