Lambdas - uses and abuses
summary
Claims specific behavior of C++ lambdas: every lambda produces a unique closure type, C++20 adds explicit template parameters, default construction, pack-init captures and structured-binding captures, but recursive lambdas remain unsupported so recursion uses a Y combinator/inheritance trick. Implements concrete utilities: make_task, log_init, multi-destination logger and a chain of responsibility built by inheriting from multiple closure types, using fold expressions, aggregate initialization and deduction guides; examples compile and avoid dynamic polymorphism.
AI-written summary · about
chapters (5)
- 0:00Start
- 14:30Lambdas in C++20: init capture pack expansion
- 16:31Lambdas in C++20: recursive lambdas
- 26:16Recursive lambdas: better composition Composing through inheritance
- 38:43Chain of responsibility: multiple loggers A typical chain of responsibility
related talks
01h 05mC++ Lambda Idioms
06mLightning Talk: The Decade Long Rewind: Lambdas in C++
53mExplaining Lambda Calculus through Plain JavaScript
37mFun with Lambdas!
45mClosed for Inventory: The History and Mechanics of Closures
01h 03mLambda Calculus For People Who Can't Be Bothered to Learn It - part 2 of 2
48mIt’s birds all the way down: Fun Introduction to Lambda Calculus
59mLambda Calculus For People Who Can't Be Bothered to Learn It - part 1 of 2
