r/programminghorror
•
u/Leonnee
•
Jun 12 '25
•
1
Javascript Javascript is filled with horror
2.4k
Upvotes
View all comments
Show parent comment
10
u/TorbenKoehn Jun 12 '25
Sure, magically switching the comparison function based on input array is way more intuitive and safe. It’s what the people here propose as an alternative.
Obviously better than just saying „this is the default, you can always change it, but it won’t change magically“