[ Ссылка ]
—
Presentation Slides, PDFs, Source Code and other presenter materials are available at: [ Ссылка ]
—
Tony Hoare called null pointers a “billion-dollar mistake”, but nearly every language in wide use today has them. There have been many efforts to reduce the risk of nulls creeping in where they shouldn't be, but most involve attributes or annotations rather than being part of the type system itself. Can we do better? C++'s customizable value types make it possible to solve this sort of problem.
In this talk, I’ll present a non-nullable pointer wrapper, `nn`, that’s found wide use in Dropbox’s C++ code. This helper lets us use the type system to track pointers that can't be null, and express and enforce contracts at compile time. I’ll go into some depth on the template trickery needed to make things “just work”, the toolchain bugs we found along the way, and how this tool has helped us improve our code.
—
Jacob Potter is a recovering embedded systems engineer who is now driving Dropbox’s use of modern C++ for cross-platform mobile development. He's also the primary maintainer of Djinni, the tool Dropbox uses for generating cross-language bindings.
—
Videos Filmed & Edited by Bash Films: [ Ссылка ]
—
Optimized And Managed by Digital Medium Ltd - events.digital-medium.co.uk
events@digital-medium.co.uk
*-----*
Register Now For CppCon 2022: [ Ссылка ]
*-----*
Ещё видео!