News for hackers. Stuff that matters.
Re:A Defer Mechanism for C by wbl on Monday December 14, 2020 @10:07AM (#25418372)
Defer has the benefit of being dynamic vs the scope tied cleanup.
Re:A Defer Mechanism for C by mikepurvis on Monday December 14, 2020 @10:30AM (#25418633)
I think it depends what problem you're trying to solve. If you're just trying to kill kernel-style GOTO cleanup pyramids, then having it tied to scope with no unwinding or anything dynamic is perfectly adequate.
Re:A Defer Mechanism for C by eqvinox on Monday December 14, 2020 @10:21AM (#25418516)
Not sure I'd call that a benefit, honestly.