Re: Try/Catch

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

In 99.99 % (or thereabouts) of cases the programmer will NOT know what that correct runtime value is.

But wouldn't it be worse for us as language developers, who are even farther away from the program than the programmer is? So isn't it even more absurd for us to try to set the runtime value?

Well, Matt said "No value" which I realize is actually better than default value. So I'm going with that.

It doesn't really matter what value would have been used - they'll all be wrong anyway. But the function might just be expected to return something.

The point I was making was that solving bad indexes is not made easier with try/catch. But you did suggest that the programmer could "set" the runtime value inside the exception handler but that really would be futile given the difficulty of the problem.

Spock

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

Search



Quick Links

User menu

Not signed in.

Misc Menu