Programming in Modern C with a Sneak Peek into C23
summary
C shows concrete, modern tricks: compound literals enable in-place default-argument–style structs and zeroing (example prints 42 and even Unicode); designated initializers let sparse or out-of-order field setup (an initializer list produces an array size of 12 in the demo); flexible array members replace two mallocs with one contiguous allocation. Examples use GCC trunk and Compiler Explorer (C23 landed last week, _Bool became a keyword); generic selection macros and VLA/static array parameter checks (malloc size for a 10x10 int array = 400 bytes) are demonstrated.
AI-written summary · about
chapters (10)
- 0:00Welcome to modern C
- 6:03What modern C means
- 9:30C quirks quiz
- 19:46Designated initializers
- 31:23Arrays in modern C
- 49:51Compound literals and zeroing
- 1:04:26Flexible array members
- 1:09:43Macros and generic selection
- 1:16:32Live refactoring to modern C
- 1:27:11Summary
related talks
01h 06mModern C and What We Can Learn From It
52mNon-conforming C++: the Secrets the Committee Is Hiding From You
01h 00m"New" Features in C
01h 02mReintroduction to C
59mModern C++ for Fun and Profit: This isn’t your old C++
01h 04mA Preview of C++ 23
01h 30mTaming C++23 - The Things About C++23 You Do Not Know
05mEasing into Modern C++
