Re:A Defer Mechanism for C
by scythe on Monday December 14, 2020 @10:15PM
(#25426548)
The nonlocality can be eliminated by replacing the `guard {}` block with a `resolve;` statement to be placed at the end of a block containing multiple `defer`s. This also reduces nesting and solves the question of where the `defer` is executed and makes it easy to grep to the location where the `defer` statement will be executed. Of course, it would be a syntax error to use `defer` without a following `resolve;`.
[ Parent
| on HN ]
There are no comments on this comment yet.