(no title)
LexiMax | 10 days ago
Though I do wonder what the chances are that the C subset of C++ will ever add this feature. I use my own homespun "scope exit" which runs a lambda in a destructor quite a bit, but every time I use it I wish I could just "defer" instead.
pjmlp|9 days ago
Then again, if someone is willing to push it through WG21 no matter what, maybe.
mort96|9 days ago
C++ would be a nicer language with native defer. Working directly with C APIs (which is one of the main reasons to use C++ over Rust or Zig these days) would greatly benefit from it.
anilakar|9 days ago
[1] https://gotofail.com/
uecker|9 days ago
surajrmal|9 days ago
mwkaufma|9 days ago