Free your functions!
summary
Claims that C++ should favor non-member non-friend functions over member functions and backs that with concrete examples and mechanisms: a small reset_values free function reduces coupling and duplication, enables overloading and templates, and makes unit testing simpler; standard-library moves like std::begin and free real/imag show generic-code necessity; a struct-with-member compute example demonstrates performance limits (thispointer inhibits optimization) and a free function can be faster. Also covers namespaces, detail hiding, and mock/virtual dispatch patterns.
AI-written summary · about
chapters (14)
- 0:00The importance of software
- 2:39Introduction to SOLID
- 4:40Encapsulation arguments
- 7:50Coupling and flexibility
- 13:21Reusability and naming
- 16:02Generic programming
- 21:01Testability advantages
- 24:02Performance benefits
- 26:41Real-world examples
- 31:02Addressing counter-arguments
- 36:41Tooling and syntax
- 40:00Mocking and paradigms
- 43:28Guidelines and conclusions
- 51:14Q&A and closing
related talks
56mMaking C++ Code Beautiful
01h 00mBack to Basics: Object-Oriented Programming in C++
01h 28mLaw of Demeter: A Practical Guide to Loose Coupling
57mSums, Products, Exponents, Monoids, Functors, Oh My!
04mFantastic Four, The Invisible "Features"
06mLightning Talk: The Most Important Design Guideline
01h 31mCreating intuitive APIs
16mClojure vs Design Patterns
