“AAAARGH!? Adopting Almost Always Auto Reinforces Good Habits!?"
summary
Case study applies the almost-always-auto idiom to a simple game loop, converting member and local variables, functions and lambdas, and building helpers like a makeUD wrapper and a make_array shim; code lives on GitHub. Counts: explicit types drop to zero in places while deduced types and source size increase; after 11 million turns runtime slightly improves for simple cases and is slightly slower for a multi-player loop. Uses C++11/14 features, uniform_int_distribution, and shows where lambdas and array deduction bite performance or readability.
AI-written summary · about
chapters (13)
- 0:00Introduction and overview
- 1:48What is Almost Always Auto
- 3:52Case study setup
- 8:07Applying Almost Always Auto rules
- 12:01Auto for functions and lambdas
- 15:35Random spell selection
- 17:03Removing explicit types from lambdas
- 19:52Reusable deduction utilities
- 22:46Conditional damage spells
- 28:35Multiplayer loop support
- 34:21Generic algorithm challenges
- 36:53Overall takeaways and observations
- 37:58Q&A session
related talks
56mCute C++ Tricks (and what you can learn from them): Part 2 of N
32mCute C++ Tricks, Part 2 of N: More code you should learn from and never write
51mModern techniques for keeping your code dry
01h 03mHigher order functions for ordinary C++ developers
01h 20mBetter Code: Relationships
59mModern C++ for Fun and Profit: This isn’t your old C++
01h 05mDon’t Get Overloaded by C++ Overload Sets
05mEasing into Modern C++
