by AdieuToLogic · 1y ago · 0 comments
Are you sure about that?
So how do you suggest handling hexadecimal numbers?
Or octal numbers?
What about binary numbers?
What about file names with portions of a date and/or time?
How is a program supposed to know any of the above?
> Let's say I have a directory of 32 numbered files.Assuming any of the filesystems I am aware of is in use, those names are strings having one or two characters. They are not "numbered files."
It just happens to be the most logical way to sort for computers too, as long as humans are involved in the usage of the data.
That would be great, but this ISO is just one of the standards, and there are still regional standards as well.
And that's still ignoring the end-user. In Europe for example, humans might create filenames with date in format dd.mm, e.g. "Report 25.01.xls"
A system attempting to sort this intelligently would likely assume this is a decimal number, as it has zero context for it.
It's just slightly worse than the lack of consistent UTC-usage of systems, with the mixed attempts to correct data to local timezone (or not) depending on application...
> 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.
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.)
Op was taking about changing the rule to something more intuitive, in such case it would s'en natural that decimal numbers are used.