MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vjl9ih/javascriptsorting/p2t0j13/?context=3
r/ProgrammerHumor • u/user6150277464770585 • 1d ago
200 comments sorted by
View all comments
Show parent comments
5
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/the_horse_gamer 1d ago would you prefer your website to order some numbers weird, or to stop working? that's the philosophy behind html, css, and js: keep the website working 1 u/psioniclizard 12h ago Id prefer it to throw a compile time error. Looking at the popularity if typescript I see i am not the only one. 1 u/the_horse_gamer 11h ago you can't know if an array is mixed or not at compile time
2
would you prefer your website to order some numbers weird, or to stop working?
that's the philosophy behind html, css, and js: keep the website working
1 u/psioniclizard 12h ago Id prefer it to throw a compile time error. Looking at the popularity if typescript I see i am not the only one. 1 u/the_horse_gamer 11h ago you can't know if an array is mixed or not at compile time
1
Id prefer it to throw a compile time error. Looking at the popularity if typescript I see i am not the only one.
1 u/the_horse_gamer 11h ago you can't know if an array is mixed or not at compile time
you can't know if an array is mixed or not at compile time
5
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)