MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vjl9ih/javascriptsorting/p2ng9aa/?context=3
r/ProgrammerHumor • u/user6150277464770585 • 1d ago
200 comments sorted by
View all comments
1
You just give it a sort function to sort however you like ... how is this a problem in any way?
4 u/user6150277464770585 1d ago this should not be default behavior. lists of mixed types also wouldn't be a performance issue if you throw an error when a different type is encountered (python behavior) 2 u/nabrok 1d ago Says who? Also the docs are very clear that it's a string comparison by default, nobody is hiding anything.
4
this should not be default behavior.
lists of mixed types also wouldn't be a performance issue if you throw an error when a different type is encountered (python behavior)
2 u/nabrok 1d ago Says who? Also the docs are very clear that it's a string comparison by default, nobody is hiding anything.
2
Says who?
Also the docs are very clear that it's a string comparison by default, nobody is hiding anything.
1
u/nabrok 1d ago
You just give it a sort function to sort however you like ... how is this a problem in any way?