You list GOF, yet often openly dismiss it (e.g. discussing inheritance).
Patrick Seda

Have you read the GoF? It was the first source that started to make me doubt the value of class inheritance. I frequently quote the GoF when I’m speaking on those topics.

The essence of the GoF is built on two foundational principles discussed in the beginning of the book:

“Program to an interface, not an implementation.”


“Favor object composition over class inheritance.”

The latter follows from the first because child classes depend on the parent class implementation. Class inheritance is the tightest coupling available in OO design.

I don’t dismiss the GoF. It was a big influence on me and my programming style, and the lessons I learned from it form the foundations of my OO Design world-view.

It contains little pearls of timeless wisdom throughout, and shares by example a language that we can use to discuss reusable software design patterns.

That said, the GoF was written during the height of Java from the perspective of deeply intrenched OOP designers, and it is certainly less relevant today than it was the day it was written, and a developer whose first language is JavaScript might find some of the patterns silly or redundant. Many of them jump through unnecessary hoops when read from the perspective of somebody fluent in JavaScript and familiar with prototype-based mixins and delegation.

For example, delegate prototypes themselves are essentially the flyweight pattern for free.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.