top | item 40411197

(no title)

strombofulous | 1 year ago

Article's about a guy who doesn't like using try catch as control flow

discuss

order

InfiniteRand|1 year ago

Apparently he finds null checking better

nox101|1 year ago

"Exception" has a meaning. Exceptions are supposed to be used for just that, unexpected situations. Not being able to parse something is not an exception. It's a normal thing. RegEx doesn't throw an exception when there's no match. Array.indexOf doesn't throw an exception when it doesn't find a something.

It's really nice to able to go into the debugger and say "stop on all exceptions" and not be spammed with the wrong use of exceptions

And so, it's nice that we'll have `URL.parse`

justin_oaks|1 year ago

You don't?

If that's the case, can you explain why?