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 1 '14 at 18:39...
is also executed when thetry
block 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 thefinally
with other constructs but I think it's far beyond the threshold for syntactic sugar. – delnan Oct 1 '14 at 19:03