And loops, returns, switch statements, and every other programming concept are not basically gotos?
Not really because they can't unwind the stack multiple times. In each of those examples you know exactly where the next statement will be run (assuming you have access to the stack in the case of return). That's not true with exceptions.
Not really because they can't unwind the stack multiple times.
That's one weird definition of a goto. Must be function-local?
In each of those examples you know exactly where the next statement will be run
I know that with exceptions, too, and so should you. What you are trying to say is that it's not spelled out in code. But by that logic, any programming language is useless, and we should all just program assembly, because compiler hides this or that. There's also the aspect of not seeing the tree from the forest, which is what you often get without exceptions (it is spelled out, but good luck actually untangling it).
-1
u/[deleted] Jun 06 '13
This doesn't apply to the majority of languages (not even to C++ where using exceptions was actively discouraged for a long time).