Comment on Why are so many new programming languages being developed?
Dookieman12@piefed.social 4 days agoJust wanted to add, the reason JavaScript is on the web is because it’s designed to keep running, no matter what errors occur. This is the opposite of what’s desired from most languages, but the reason it’s a priority for JS is because the web page HAS to work.
This is the reason for a lot of JS’s quirky behavior, such as type coercion. In most cases, 1 + ‘cat’ should absolutely produce a terminating error. But, you don’t want someone visiting your site to have the page crash, so it’s preferable to return bad data than to terminate entirely, so you get ‘1cat’ as your output.
Nibodhika@lemmy.world 4 days ago
Interesting, had never considered that, it does make sense. Although that created the absolute clusterfuck that is JS where
[ ] + [ ]is“”and{ } + { }isNaN. Thanks for remind me of www.destroyallsoftware.com/talks/wat hadn’t watched that in a while.