~/talk

10 Tips for Cleaner C++ 20 Code

Talkat CppCon 2022 · 2022-09-11..09-16· [rust]
links:none on file
slides:none on file

Builds a small VOD app and iteratively refactors it so you can see each change: splits a bulky readMovies into readMovie + lazy generator via C++20 coroutines to avoid loading 10k files, replaces exceptions with TL expected / std expected for expected errors, introduces constructor injection and the header‑only IoC hypodermic to swap a mock streamer (tests shrink from waiting 20s), moves APIs into interfaces, prefers composition over implementation inheritance, and shows modules/head‑units work but tooling is uneven.

AI-written summary · about

  1. 0:00Intro
  2. 1:02Implementation of the STL
  3. 4:35Clean code tradeoffs
  4. 7:59Best Practices for Software Design
  5. 17:05Managing headers
  6. 20:22Improving error handling
  7. 28:23Use generators for lazy iteration
  8. 36:55Refactoring Step
  9. 42:05Dependency Injection
  10. 42:43Constructor injection
  11. 44:14Inversion of Control Container
  12. 51:20Lessons Learnt
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.