Public/Protected/Private: A Redundant OOP Feature?

2025-06-19

This article challenges the necessity of access modifiers (public, protected, private) in object-oriented programming. The author argues that interfaces and inheritance combined can achieve the same functionality without the need for an extra mechanism. The existence of access modifiers might stem from an oversight in the design of Simula, leading to redundant functionality. For cleaner code, the author suggests avoiding access modifiers and advocates for composition over inheritance.

Read more
Development Access Modifiers

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.

Read more
Development inheritance