Get the latest tech news

Inheritance was invented as a performance hack (2021)


's well known that inheritance was invented by Simula. The History of Programming Languages session on Simula tells us the motivations behind that invention.

Inheritance was invented by the Simula language as a way to support intrusive lists, save memory, and simplify the garbage collector. When writing simulation programs we had observed that processes often shared a number of common properties, both in data attributes and actions, but were structurally different in other respects so that they had to be described by separate declarations. – Section 3.1, The Development Of The Simula Languages As a result of the limitations of their GC, they weren't able to use "parametrization" (what we'd call composition) to customize classes.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of inheritance

inheritance

Photo of performance hack

performance hack

Related news:

News photo

Inheritance and Subtyping

News photo

Liskov Substitution: The real meaning of inheritance

News photo

How can you represent inheritance in a database? (2010)