Skip to content
0:00 / 0:00

#c++#raii#strongtypes

Correct by Construction: APIs That Are Easy to Use and Hard to Misuse - Matt Godbolt [ C++ on Sea ]

cpponsea

18K subscribers • 5 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Matt Godbolt, creator of Compiler Explorer

Intermediate. Assumes working knowledge.

21K views6 years ago1 recommendation

Programming languagesSoftware designC++Language design and type systemsDesign patterns

Matt Godbolt discusses techniques in C++ such as strong types and RAII to design APIs that prevent user errors at compile time.

C++ gives us an awful lot of powerful constructs to use when designing APIs: strong types, RAII, templates, virtual functions and more. Some are easier to use than others, and some might be easy to use but easy to misuse. In this talk, Matt will cover some of the techniques you can use in your API and code in general to make it more difficult for users to make mistakes. You'll leave the talk with some new ideas to try out in your code bases: your future users (maybe yourself the very next day...) will thank you! ------- Matt Godbolt is the creator of the Compiler Explorer website. He is passionate about writing efficient code. He has previously worked at a trading firm, on mobile apps at Google, run his own C++ tools company and spent more than a decade making console games. When he's not hacking on Compiler Explorer, Matt enjoys writing emulators for old 8-bit computer hardware. ------- C++ on Sea is an annual c++ and coding conference, usually held in Folkestone, Kent in the UK. The 2020 conference was moved to a virtual event due to social distancing requirements. Produced and Edited by Digital Medium Ltd: events.digital-medium.co.uk Enquiries: events@digital-medium.co.uk

Why it's here

1 person recommends this

What people say. Recommended as a great explanation of using C++ compiler features to design robust APIs that prevent misuse.

u/00jknightin r/programming • Recommends

On “Python creator Guido van Rossum joins Microsoft”

They are common in c++ but c++ gives you some really powerful tools to create APIs that won't compile unless they are used correctly. eg) link to this video link to this video Most python shops rely on unit tests to replace the lack of confidence that comes with not having a compiler. & they usually have lots of really bad tests, because tests are very hard to make truly bullet proof.