Some Programming Myths Revisited
summary
Argues that several entrenched C++ rules deserve re-evaluation: goto considered harmful is overstated because break/continue/switch handle structured jumps, compilers optimize away micro-optimizations, and language rules prevent skipping constructors; only one return per function is often harmful for clarity and performance, early returns reduce temporary/default construction (std::variant/monostate and exceptions are shown); initialize everything wastes work — declare when needed; all data private is good advice but not mandatory if no invariants exist. Measure before optimizing and prefer small functions.
AI-written summary · about
chapters (10)
- 0:00Introduction to myths
- 3:16Go-to statements reconsidered
- 8:12Error handling with jumps
- 13:53Structured programming trade-offs
- 22:23Single exit per function
- 28:00Early returns in practice
- 38:57Public vs private data members
- 44:00Initialization myths
- 52:51Modern coding practices
- 57:10Q&A and closing








