News for hackers. Stuff that matters.
Re:Avoid Else, Return Early (2013) by gwbas1c on Monday March 26, 2018 @01:28PM (#16680704)
That's why newer languages have try-finally.

Basically

Allocate resource

try

guard clause (early return)

logic

finally

deallocate

Basically, the try-finally clause guarantees that the finally clause is run when there is an early return.

There are no comments on this comment yet.