49 ms·
I think the author meant "There are exceptions, in the real life meaning of the word", rather than the unwind-the-stack-when-a-bobo-happens programming construc
by arithma 14y ago
I think the author meant "There are exceptions, in the real life meaning of the word", rather than the unwind-the-stack-when-a-bobo-happens programming construct.
- gordonguthrie 14y ago> For the one case where people needed global control flow transfer (error handling) exceptions were developed. This was a progress from the extreme universality and abstraction of a goto-driven program to the concretion and specificity of pieces (such as procedures) solving specific problems. 'Throw' just means 'GOTO up somewhere' it is a posh goto...
- JoeAltmaier 14y agoNOt quite - throw doesn't specify where to go, leaves it up to the caller. Very much more useful.
- gordonguthrie 14y agoYeah, but the problem with GOTO isn't at the GOTO end - that is usually very clear - in this case go here... The real problem is at the arrival point 'where has the thread of execution come from, and what state is the programme in'. Exceptions have the same arrival problem 'where in the code did this come from, and what was the state when it was thrown?'
- zwieback 14y agoTime to bring up the COME FROM statement: http://en.wikipedia.org/wiki/COME_FROM http://en.wikipedia.org/wiki/COME_FROM