The expected behavior is a default natural number sort.
What other default was chosen? String comparison for some value of Strings, coerced from the integers in some way.
If you have to research a bunch of implicit behavior to understand how sort works for numbers. I believe that's unintuitive by definition (simplest case is more complex than necessary). Fixable with a required flag or specialized functions (eg PHP).
No. It's not obvious.
Python -
PHP - Rust - The expected behavior is a default natural number sort.What other default was chosen? String comparison for some value of Strings, coerced from the integers in some way.
If you have to research a bunch of implicit behavior to understand how sort works for numbers. I believe that's unintuitive by definition (simplest case is more complex than necessary). Fixable with a required flag or specialized functions (eg PHP).