News for hackers. Stuff that matters.
Re:A Defer Mechanism for C by jcelerier on Monday December 14, 2020 @12:00PM (#25419841)
> You could write a RAII implementation in terms of defer but not the other way around.

c'mon, here's the article from 2000 that introduces ScopeGuard : https://www.drdobbs.com/cpp/generic-change-the-way-you-write...

Re:A Defer Mechanism for C by gpderetta on Monday December 14, 2020 @01:50PM (#25421489)
Right! And to be clear you cannot implement RAII in term of defer as RAII is lifetime based while defer is only scope based.