The Dawn Of A New Error - Phil Nash [ACCU 2019]

Описание к видео The Dawn Of A New Error - Phil Nash [ACCU 2019]

#CPP #ACCUConf #errorhandling

As a community we’ve tried many different ways to express, propagate and handle error conditions in our code over the years. Each seem to have different trade-offs, with none being perfect in all cases.

In C++ we adopted exceptions as the primary mechanism early on, and the standard library uses them extensively.

Yet many - 52% according to last year’s Standard C++ Foundation survey - ban exceptions in all, or part, of their codebases!

Recently there has been a lot of interest in using ADTs (Algebraic Data Types) such as std::optional, or the proposed std::expected, for error-handling. There are definitely advantages here, but we’re still not quite there yet. Can we do better?

This presentation summarises the material from my earlier talk, "Option(al) Is Not a Failure", where I survey existing error-handling approaches and score them against each other, leading up to the new proposal, p0709r1, "Zero-overhead deterministic exceptions". We then dig into this proposal in more depth and look at the implications, considering also the supporting proposals, p1028 (std::error) and p1029 ([[move relocates]]) and others. We’ll also look at experiences with similar mechanisms in other languages, notably Swift, to get an idea of how it might work out in practice.

In the end we should have a solid idea of which error handling strategy to use when, what’s coming next, and how to approach code now that will play nicely in that possible future.

-------------------------

Phil Nash is the author of the test frameworks, Catch – for C++ (and Objective-C), and Swordfish for Swift. As Developer Advocate at JetBrains he’s involved with CLion, AppCode and ReSharper C++. He’s previously worked in Finance and Mobile as well as an independent consultant and coach specialising in TDD on iOS.

-------------------------

Future Conferences:
ACCU 2019 Autumn Conference, Belfast (UK):
2019-11-11 and 2019-11-12.
ACCU 2020 Spring Conference, Bristol (UK), Marriott City Centre:
2020-03-24 to 2020-03-28.

-------------------------

ACCU Website: www.accu.org
ACCU Conference Website: conference.accu.org
ACCU Twitter: @ACCUConf
ACCU YouTube:    / accuconf  

Filmed and Edited by Digital Medium Ltd - events.digital-medium.co.uk Contact: [email protected]

Комментарии

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