Expect the Expected (aka Writing Error Resilient Code)



Writing code that is resilient upon errors has always been a pain point in all languages. Exceptions are the politically correct means to signal errors in C++, but many applications still resort to error codes for reasons related to ease of understanding, ease of handling errors locally, and efficiency of generated code. This talk shows how a variety of theoretical and practical artifacts can be combined together to address error codes and exceptions in one wholesome, simple package. The generic type expected<T> can be used for both local (error-code-style) and centralized (exception-style) manners, drawing from the strengths of each. EVENT: CppCon 2018 SPEAKER: Andrei Alexandrescu PERMISSIONS: CppCon Organizer provided Coding Tech with the permission to publish this video. https://www.youtube.com/watch?v=lvUngaI3fWQ

Leave a Reply

Your email address will not be published. Required fields are marked *