Choosing an Abstraction
summary
Shows a tiny state machine implemented with an enum to trim and compress spaces and then compares four concrete interfaces: pass-by-reference, pass-by-value-and-move (C++11), iterator-based STL algorithm with back_inserter, and a native abstract get/put model. Demonstrates the STL variant is extremely flexible but hairy to implement, the get/put maps directly to the state machine, pass-by-value can avoid extra allocations, and no benchmark numbers are provided and the final recommendation is cut off.
AI-written summary · about
related talks
01h 00mDesign Idioms from an Alternate Universe
01h 13mModernizing Finite State Machines in C++ - Empower Simplicity & Boost Performance With std::variant
49mApplied Modern C++: beyond type erasure and visitor pattern
01h 02mBack to Basics: Classic STL
36mOn the Spectrum of Abstraction
44mPartially-formed Objects for fun and profit
01h 05mThe Imperatives Must Go!
01h 01mAbstraction the true superpower of C++
