Talk:Sort using a custom comparator

From Rosetta Code

This is a cleanup of the old Sorting page. I've started it with examples for C, Haskell, Perl, and PHP, and I'll try to get Java and Objective-C in soon. I don't believe the task (strictly speaking) is possible in a UNIX shell without invoking a more complete language like Perl.

I need people to verify/fix any relevant examples from the other languages in Sorting, and add them here (edited for consistency of course). --Bob9000 06:23, 30 January 2007 (EST)

I created a template to help you out: Template:split-review...Add it to the tasks you create, just under {{task}}. The text to add is {{split-review}}.
There will be a central Maintenance depot soon. Right now, Category:Maintenance will have to suffice.
Thanks for all your efforts...I've been watching the Recent Changes page, and you're one of the top two or three contributers. --Short Circuit 11:11, 31 January 2007 (EST)

Ada example incorrect

I do not understand how the Ada example is incorrect. It uses a custom comparator. It performs the two sorts required (descending length and ascending lexical sort). What is the complaint?

I'm not the complainant, but the Ada example does not actually appear to do what the task is asking, namely produce ONE list of strings that are sorted by length AND sorted lexicographically where strings are the same length. The first output result appears to be correct (strings are sorted by length and where strings have the same length they also happen to be sorted lexicographically) but that looks more like chance when I look at the code. Or if "lexicographic" is a default secondary sorting criterion in Ada then this should be spelled out. And it is unclear why there are two output lists. Or at least that what I understand the task to be; maybe I'm kinda misreading this somehow. Sgeier 10:18, 20 September 2007 (MDT)

I see the problem. My second sort is case sensitive. Thanks for your patience.

Hm. I didn't see when the {{incorrect}} template was added. Normally, when such templates are added, the reason should be mentioned in the Talk page. I don't know why that didn't happen in this case. I'll check the template and see if I can't clarify it a bit. --Short Circuit 23:37, 18 February 2007 (EST)