Hacker News new | ask | show | jobs
by gordonguthrie 5019 days 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...

1 comments

NOt quite - throw doesn't specify where to go, leaves it up to the caller. Very much more useful.
Yeah, 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?'

Time to bring up the COME FROM statement: http://en.wikipedia.org/wiki/COME_FROM