Re: Try/Catch

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
Spock said...
mattlewis said...
Spock said...

The "equivalent" is inside the internal routine. So, crash during development, allow with default value in deployment.

Oh, right, forgot about the default value proposal. I really don't like that idea.

Matt

What value would you use instead?

Spock

There are a couple of other things we could use, such as leaving the variable unchanged, reseting the variable back to being uninitialized, or a new builtin constant that is a value but is not an integer, atom, or sequence (e.g. ERR_IDX). But I think that from Matt's POV, they all share the same problem - whereas, try/catch doesn't.

The best value is the correct value that the programmer intended. If try/catch can magically know what that is then Great! But that just begs the question of why the programmer didn't correct the logic error that led to the exception being raised in the first place!

"they all share the same problem" - not stated what this is
"whereas, try/catch doesn't" - not stated how this is any better

This is just handwaving.

Spock

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu