A Simple Example of the Null Object Pattern

Опубликовано: 28 Июль 2026
на канале: Hector Fontanez
1,561
15

As the title indicates, this is a simple example illustrating how to use the Null Object Pattern correctly, by making the null object classes immutable. The origins of this pattern can be traced to the Null Iterator proposed by the Gang of Four (GoF). This idea evolved over a few years and eventually the Null Object Pattern was first published in the book "Pattern Languages of Program Design 3" by Robert C. Martin, Dirk Riehle, and Frank Buschmann.

(Sorry for how I sounded. Allergies are getting the best of me.)

My blog on Null Object Pattern: https://www.professorfontanez.com/202...

Design Patterns Github: https://github.com/prof-fontanez/Desi...