Talk:Natural sort order

Latest comment: 5 years ago by 98.173.45.78 in topic Article is wrong

Article is wrong edit

This article defines natural sort as essentially an alpha sort, "except that multi-digit numbers are ordered as a single character". I've never heard of a natural sort that behaves this way and at least one of the citations doesn't define it this way.

As it's defined in this article, a list of: "a123,z5,z11,z13" would be sorted as "a123,z11,z13,z5". Definitely not natural sort.

Natural sort is some combination of alpha+numeric. Alpha is sorted as alpha and numbers are sorted as numbers so the example above should end up as: "a123,z5,z11,z13"

72.196.168.95 (talk) 20:03, 14 June 2018 (UTC)Reply

As it's defined in the article, "a123,z5,z11,z13" would be sorted as "a123,z5,z11,z13". Which is correct. I don't understand where you see get the result "a123,z11,z13,z5". Thue (talk) 13:09, 15 June 2018 (UTC)Reply
FTA - This is the part that's incorrect: "except that multi-digit numbers are ordered as a single character". This means that as far as this article is concerned, "z1" and "z1000000" are identical values. the example you gave is exactly why this article is incorrect because you'd expect z5 to come before z11 but it won't according to how this article defines natural sort. The reason I even ended up here is because I found a nat sort implementation that referenced this article and is wrong. 98.173.45.78 (talk) 00:31, 12 July 2018 (UTC)Reply