News for hackers. Stuff that matters.
Re:A Defer Mechanism for C by eqvinox on Monday December 14, 2020 @10:20AM (#25418509)
Doing other things in the proposal is no argument against having an attribute((cleanup)) compatible syntax for the part that overlaps.

Also, the defer syntax they're proposing seems nicer in terms of syntactic sugar (no need for a stub function), but at the same time the semantics seem ... weird. Having it tied to a variable makes more sense, and sidesteps a whole bunch of weird situations (like loops with defer statements).

Re:A Defer Mechanism for C by gustedt on Monday December 14, 2020 @04:11PM (#25423379)
In the contrary, I find it really weird to bind all cleanup code to some kind of object with constructors and destructors. People seem to have gotten so used to this ... I think that for C it is much more natural to have a control structure in the language for this.