Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is a rule that works for all cases. It's lexicographical sorting.

Simple. Consistent. Easy to manipulate to get what you want.



We just discussed a situation where lexicographical sorting doesn’t work. Adding in a rule to treat consecutive digits as one number doesn’t significantly complicate the logic and makes sorting work for a major additional use case. It doesn’t magically fix every case but it fixes a common one with minimal downsides.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: