Comment on Why are so many new programming languages being developed?

<- View Parent
Dookieman12@piefed.social ⁨4⁩ ⁨days⁩ ago

Just 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.

source
Sort:hotnewtop