Which programming language first came up with the finally block?
I ask purely out of curiosity.
It is a very useful piece of syntactic sugar, and whoever first created it surely has a very impressive grasp of solutions to programming problems.
(Note: it is deceptively difficult to find an answer to this question...)
try{}catch(e){...;throw e;}– ratchet freak Oct 01 '14 at 18:39...is also executed when thetryblock is left via any other means:continue,break,return, and whatever other control flow statements the language offers. Of course there is still a way to replace thefinallywith other constructs but I think it's far beyond the threshold for syntactic sugar. – Oct 01 '14 at 19:03finallymethods. Catching and immediately rethrowing an exception is thus not the same thing as not catching it. – supercat Oct 01 '14 at 22:09