Re:Avoid Else, Return Early (2013)
by jasonmaydie on Monday March 26, 2018 @10:22AM
(#16679093)
it's not just about in app resources. This could also affect external resources.. like not cleaning up temporary files because a future maintainer returned early and left some critical data behind.
[ Parent
| on HN ]
RAII can handle such resources, and good use of RAII does handle such resources. Languages without time-deterministic GC even tend to add extra language constructs to aid this, such as `using` in C# and Java (7?) with its new `try` block.