A Type, by Any Other Name
summary
Google's C++ library team uses type aliases to migrate millions of lines non-atomically: create a new implementation class, make old names alias the new one, and flip users piecewise. Concrete example: ArraySlice and MutableArraySlice (50–100k call sites) merge into a single span by hiding dependent-template logic in a central impl, removing ~100+ lines of metaprogramming. The talk warns about breakage from ADL and forward declarations and shows tools like template aliases and std::conditional to avoid massive, disruptive renames.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:28Rename types
- 2:52Why rename
- 5:27Why refactor
- 7:55Why not make a new type
- 14:50Examples
- 20:09Hirams Law
- 24:21pandas are sad
- 26:11Template aliases
- 28:26The sad owl
- 30:06Summary
- 32:16Story
- 40:04Claim
- 41:38Wrapup
related talks
41m“Avoiding Disasters with Strongly Typed C++”
01h 01mRethinking the Way We Do Templates in C++
01h 01mMaintainability and Refactoring Impact of Higher-Level Design Features
55mBreaking Dependencies: Type Erasure - The Implementation Details
59mStrongly Typed Containers
01h 02mAdvanced Levelization Techniques (part 2 of 3)
01h 07mDesign Patterns in Modern C++
01h 28mModern C++ Design reloaded
