Modern C and What We Can Learn From It
summary
C99/C11 techniques reorder the game: designated initializers and compound literals let complex graphics pipelines be declared as values; passing structs by value and zero is initialization remove many pointer+outparam patterns and improve optimizer behavior. Use _Generic for overload-like macros, scope macros for defer semantics, and single-header libs (stbds) for portable dynamic arrays/hash maps. Case studies: Chrome once triggered ~25,000 implicit allocations on a keystroke; a modder cuts GTA Online load time by ~70% by replacing libc string APIs and removing allocations.
AI-written summary · about
chapters (18)
- 0:00Modern C journey
- 1:59C history and standards
- 4:01C vs C++ differences
- 8:10Advanced initialization
- 12:27Declarative API design
- 14:52C11 features and generics
- 17:12Macro utility and RAII
- 20:22Value-oriented math APIs
- 23:17Modern error handling
- 27:36Error handling comparisons
- 30:34Generic programming in C
- 34:24Library design and building
- 37:06Resource and memory management
- 39:03Memory allocation strategies
- 42:14String handling pitfalls
- 46:16Modern string APIs
- 50:54Advanced string techniques
- 1:00:33Q&A and final thoughts
related talks
01h 28mProgramming in Modern C with a Sneak Peek into C23
59mModern C++ for Fun and Profit: This isn’t your old C++
01h 00m"New" Features in C
05mEasing into Modern C++
01h 02mReintroduction to C
01h 00mMoving Faster: Everyday efficiency in modern C++
01h 07mDesign Patterns in Modern C++
54mTypical C++, But Why?
