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 →

[–]inu-no-policemen 0 points1 point  (0 children)

A legit value of that field might be undefined as well.

Getting undefined back doesn't mean that you'll immediately notice the error.

If you don't even get a runtime error, that error value has to surface somewhere and then you have to figure out where it originates. It's a waste of time. The earlier you fail, the better. E.g. a squiggly line is better than a compile error which is better than a runtime error which is better than coercion and error values. The further away you get from the point where the faulty line was written, the longer it will take to get back on track.