Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why should I have written ZeroMQ in C, not C++ (2012). Parent comment
For the rare cases that you need finalizers which might throw I would go for something inspired by pythons with statement.
WITH(expr , lambda)
bool _exception_happened=false; auto __temp = expr; __temp.enter(); try{ lambda(__temp) }catch(const std::exception & ex){ exception_happened = true; __temp.exit(ex); } if (not exception_happened){ __temp.exit(); }
There are no comments on this comment yet.
For the rare cases that you need finalizers which might throw I would go for something inspired by pythons with statement.
expands to(sketch):