r/programminghorror • • Jun 12 '25 • This 1

Javascript Javascript is filled with horror

Post image
2.4k Upvotes

337 comments sorted by

View all comments

Show parent comment

9

u/jsrobson10 Jun 12 '25

js code continues running where any sane language would crash. like, if you have a default comparator function that takes numbers, and if not all items are numbers, then crash.

-4

u/brainpostman Jun 12 '25

It's dynamically weakly typed. Default comparator takes anything. What's the expected behavior here?

0

u/EmuChance4523 Jun 12 '25

To be a decent language and have types.

Don't talk about JS failures as if they were features.

1

u/brainpostman Jun 12 '25

It's been 30 years. These are documented behaviors.
But if you want to uselessly complain about things, be my guest.