Infiltrating a Code Base: Moving Toward a Better C
summary
Practical steps for migrating C code toward safer, low-overhead C++: replace fragile macros → real functions (compiler shows identical inlining), prefer scoped constants and declare variables where used so compilers reuse temporaries, mark inputs const everything to let the optimizer remove work, and replace implicit globals with accessors to locate mutations before converting to objects. Several before/after compiler listings demonstrate no performance regressions; examples target embedded toolchains and C89/C99 constraints with concrete refactor patterns.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 0:13Motivations for code change
- 6:09Compile-time constants
- 6:20Pseudo-functions
- 11:06Constant scoping
- 11:24Reducing function size
- 17:33Polymorphism in C
- 22:24Conclusion
- 23:51Q&A
- 24:27Final thoughts
- 25:50Resources
- 26:01Q&A
- 26:12Closing
related talks
55mIdentifying Common Code Smells (In C++)
56mIdentifying Common Code Smells
47mHelp, My Team Is Stuck In The 90s
01h 35mImpact on maintainability and refactoring for higher-level design features
41mC++ Migration Strategies
01h 37mC++ And Beyond: Discussion
54mWriting C++ to Be Read
49mWriting better code with help from Qt and the compiler
