The moment you write the word virtual, the compiler quietly adds an invisible pointer to every instance of your class. Here's what it looks like, why it's there, and how the bill grows when inheritance gets complicated.

Software Developer at Adobe building Photoshop. Writing about macOS tools, systems programming, and creative software.
The moment you write the word virtual, the compiler quietly adds an invisible pointer to every instance of your class. Here's what it looks like, why it's there, and how the bill grows when inheritance gets complicated.
A short look at why naive history implementations corrupt their own past, and how a 50-year-old trick fixes it without paying the cost of copying everything.