#480 Allow the sort/sortWith methods to sort sparse arrays as well

None
rejected
nobody
None
none
1
2014-06-29
2012-08-25
No

Currently a sparse array (an array containing empty slots in between) cannot be sorted.

It would be great, if sort/sortWith could be changed to allow sorting sparse arrays.

The result could be either a condensed array in sorted order (having all empty slots removed) or the original size, where the sorted items are stored from index 1 on up.

Discussion

  • Mark Miesfeld

    Mark Miesfeld - 2012-08-28
    • status: unread --> open
     
  • Rick McGuire

    Rick McGuire - 2013-11-20
    • Milestone: v4.2.0 --> None
     
  • Rick McGuire

    Rick McGuire - 2014-06-29

    This does not make any sense. The effect of how sparse elements should be handled in
    a sorting context really does not make any sense. This will not be implemented.

     
  • Rick McGuire

    Rick McGuire - 2014-06-29
    • status: open --> rejected
     

Anonymous
Anonymous

Cancel  Add attachments