3 ms·
A (lexically-scoped) defer is a more general than a finally block. You can express finally-block semantics using defer. It's also more exception-safe when you
by wannabe44 2mo ago
A (lexically-scoped) defer is a more general than a finally block. You can express finally-block semantics using defer.
It's also more exception-safe when you have more than one throwing call in the try block.