Inheritance: An Accidental Performance Hack

2025-05-08

Simula invented inheritance not for code reuse or extensibility, but to solve problems with its simple garbage collection and intrusive lists. Simula's GC was too simplistic to handle pointers to stack variables; to prevent crashes, it banned various parameter passing methods, limiting expressiveness. To efficiently use intrusive lists, Simula invented "prefixing" (inheritance), allowing objects to directly contain list nodes, avoiding extra memory allocation. Thus, inheritance was initially a performance optimization, not a cornerstone of OOP.

Development inheritance