CppCon 2015: Fedor Pikus “The Unexceptional Exceptions"

Описание к видео CppCon 2015: Fedor Pikus “The Unexceptional Exceptions"

http://www.Cppcon.org

Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/cppcon/cppcon2015

The main goal of this class is not to teach how to use exceptions - it's not that hard, and we will go over the basics at the start of the class. The main goal is to teach to not be afraid to use exceptions, and also not to be awed by them. We will spend few minutes on the basic syntax and semantics of exceptions, as well as their interaction with other parts of the language. Then we get to the real issue: the error handling. It is important to understand that errors, or exceptional cases, do not need to be handled by exceptions. Exceptions are just a tool that provides one way of coding the error handling, and it’s not even a very good one: overly focusing on exception handling, as opposed to error handling, often leads to code that is both buggy and hard to read and maintain. My goal is to show that the best approach to error handling involves very light explicit use of exceptions. The emphasis is put on maintaining program invariants and avoiding the undefined behavior, something all programs need to do at all times, with or without errors. Thus, a well-written program should have very little error handling code, and only a part of that explicitly deals with exceptions. This understanding is particularly important for programmers who have to deal with the “we don’t use exceptions here” mindset, or want to use exceptions for handling errors in their part of the larger legacy system. Once you understand (small) the role exceptions play in the real problem of error handling, it becomes quite obvious how to start using exceptions in a small part of a larger system without disturbing the rest of it, or even how to write very “exception-like” code without actually using exceptions. Most importantly, the exceptions are completely demystified.

Fedor G Pikus is a Chief Engineering Scientist in the Design to Silicon division of Mentor Graphics Corp. His earlier positions included a Senior Software Engineer at Google, and a Chief Software Architect for Calibre PERC, LVS, DFM at Mentor Graphics. He joined Mentor Graphics in 1998 when he made a switch from academic research in computational physics to software industry. His responsibilities as a Chief Scientist include planning long-term technical direction of Calibre products, directing and training the engineers who work on these products, design and architecture of the software, and research in new design and software technologies. Fedor has over 25 patents and over 90 papers and conference presentations on physics, EDA, software design, and C++ language.

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

*-----*
Register Now For CppCon 2022: https://cppcon.org/registration/
*-----*

Комментарии

Информация по комментариям в разработке