Ace17on Hacker News • Recommends
On “Memory management in C programs (2014)”
#scopeguard#raii#exceptionhandling
189K subscribers • 103 videos on Hallway • Conference channel
Advanced. Deep dive for people who know the field.
102K views11 years ago2 recommendations
Programming languagesSoftware designC++Design patterns
Andrei Alexandrescu presents a declarative approach to handling exceptional control flow in C++ using generalized scope guards.
Cppcon.org — Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/cppcon/cppcon2015 — Getting exception handling right is a perennial problem in C++ that has eluded systematization. Not for much longer. New language and library developments make it possible to handle exceptions in a declarative manner, leading to drastic code simplification. This talk discusses an alternative approach to handling exceptional flow that eliminates the need for small ancillary RAII classes, try/catch statements that rethrow, and other cleanup mechanisms. The popular Scope Guard idiom gets a spectacular generalization. Statements specify in a declarative manner actions to be taken if the current scope is left normally or via an exception. The resulting code is simpler, smaller, and easier to maintain. — Andrei Alexandrescu is a researcher, software engineer, and author. He wrote three best-selling books on programming (Modern C++ Design, C++ Coding Standards, and The D Programming Language) and numerous articles and papers on wide-ranging topics from programming to language design to Machine Learning to Natural Language Processing. Andrei holds a PhD in Computer Science from the University of Washington and a BSc in Electrical Engineering from University "Politehnica" Bucharest. He works as a Research Scientist for Facebook.Website: erdani.comTwitter handle: @incomputable — Videos Filmed & Edited by Bash Films: BashFilms.com Work at Hudson River Trading (HRT): tinyurl.com/safxfctfWhat people say. Recommended for its elegant generalization of the scope guard idiom to handle success and failure paths in C++.
Ace17on Hacker News • Recommends
On “Memory management in C programs (2014)”
uepon Hacker News • Recommends
On “Scope exit in C++11 (2012)”
u/Classic_Department42in r/C_Programming • Mentions
On “Defer in C (exploiting goto)?”
dnauticson Hacker News • Mentions
On “A Defer Mechanism for C”
watmoughon Hacker News • Mentions
On “Ask HN: What should have been the term for RAII?”
einpoklumon Hacker News • Mentions
On “A Tour of C++ (Third edition)”