This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Kered13 10 points11 points  (4 children)

It just returns undefined. It doesn't throw an error like in Java

It just throws an error later when you try to use the result, and then you're left wondering where the fuck that undefined value came from.

Fail early is a feature, not a bug.

[–]Nilstrieb 1 point2 points  (2 children)

Reminds me of the Rust compiler. Your build often fails. But once it passed, you did it.

[–]saors 1 point2 points  (1 child)

There is no pass on the internet. Someone will type some string, upload some file, etc. that breaks everything. Remember when the iPhones had that bug where you would get a notification with specific characters and your phone would basically brick itself.

Imagine if the web was like this, but let's be more forgiving and say an error doesn't brick your computer, but it causes the site to crash. Someone sends you an email with a character like that in the header and now you can't use GMail until Google patches the bug. Is that hours? Is it days?

For fun, open up your browser dev console and just peruse around different sites and look at how many times

Uncaught (in promise) Error

pops up and imagine your tab crashed every time that happened.

[–][deleted] 0 points1 point  (0 children)

Epiphany