The Design pattern redux
The GOF pattern and reactive programming do have a deeper connection than that is obvious from the surface. The GOF pattern is mostly concerned with writing OOP-based software . Reactive programming is a combination of functional programming, stream programming, and concurrent programming. We already learned that reactive programming rectifies some deficiencies in the classic GOF Observer pattern(in the first section of Chapter 5, Introduction to Observables, we covered this issue).
Writing OOP software is basically about modeling hierarchies, and from the pattern world, the Composite pattern is the way to model Part/Whole hierarchies. Wherever there is a Composite (which models a structure), a collection of Visitor pattern implementations (to model behavior ) will follow suit. The primary purpose of Visitor pattern is processing Composites. In other words, the Composite-Visitor duo is the canonical model for writing object oriented systems.
The Visitor implementations...