Talk:Sort an array of composite structures: Difference between revisions

Content added Content deleted
mNo edit summary
(not an associative array, but definitively a sort using custom comparator)
 
Line 3: Line 3:


Could this be renamed "Sort an associative array"? If not, why not? Waldorf's question is similar and good. The sorting tasks may deserve broader reassessment. --[[User:TBH|TBH]] 15:04, 10 January 2008 (MST)
Could this be renamed "Sort an associative array"? If not, why not? Waldorf's question is similar and good. The sorting tasks may deserve broader reassessment. --[[User:TBH|TBH]] 15:04, 10 January 2008 (MST)

: No it couldn't, because it's not an associative array (it still is indexed with a numeric index). It could be part of an associative array implementation, though.
: According to Waldorf's comment: This is indeed not just similar, but a special case of sorting using a custom iterator. Unless some language provides explicit support for sorting for a structure field, this task doesn't give you anything new compared with the other task, except maybe for structure element access (but for that, IMHO a more basic task should be created). --[[User:Ce|Ce]] 12:56, 11 January 2008 (MST)