try-finally is not inherently tied to exceptions. ...
# language-proposals
e
try-finally is not inherently tied to exceptions. It is just a control flow construct for resource cleanup, solving the same problem as defer, but with different balance. Kotlin puts explicitness of order of execution (top-to-bottom) over the desire to keep resource cleanup action close to resource acquisition action.