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

Okay, I'll refine the rule to "Treat any sequence of digits as a base 10 whole number for the purpose of sorting". I still think this is quite clear. (Frankly, I also think the original definition is quite clear unless you're purposefully trying to misinterpret it.)

> those names are strings having one or two characters. They are not "numbered files."

Yes they are! In this context, a number is an idea, not a data type. Strings are capable of containing numbers.



I generally agree that treating substrings that are numbers as numbers is a good default for most users in most situations.

However, for hex numbers this simply won't give good results because some of them will just happen to not contain any of the digits A to F and be treated as base-10 numbers by the heuristic while others will include these digits and be sorted differently.

(So, a having a strict lexicographic mode as an alternative in file managers would be nice.)




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

Search: