3 ms·
> I think the industry over-uses throwing exceptions and it's basically turned into the new GOTO This is a misunderstanding of what's bad about GOTO versus jum
by Supermancho 4y ago
> I think the industry over-uses throwing exceptions and it's basically turned into the new GOTO
This is a misunderstanding of what's bad about GOTO versus jumping to a label. eg Functions are labels you GOTO. The difference between a GOTO instruction and a Function call, for the purposes of differentiating the methodology of code routing, is that a Function is part of a stack that returns in a serial fashion. ie Each element of the stack returns to the parent before disappearing, which can be though of as "unwinding". An exception unwinds a Function stack without restriction (eg no consideration of signatures like args/returns), until it is caught in that stack, making them conceptually and practically different from GOTOs.