I wouldn’t recommend the Gang of Four book. Many of the design patterns they espouse are way over complicated from the days of peak OOP. You know, FactoryFactoryVisitor stuff. Usually best avoided.
Agreed. And a lot of it is working around limitations of whatever version of Java was common at the time.
“Visitor pattern” is better implemented as an implementation of Iterator or whatever your language calls that. Everyone knows what “for x in thing” means, but wtf does it mean to “visit” something?
I wouldn’t recommend the Gang of Four book. Many of the design patterns they espouse are way over complicated from the days of peak OOP. You know, FactoryFactoryVisitor stuff. Usually best avoided.
Agreed. And a lot of it is working around limitations of whatever version of Java was common at the time.
“Visitor pattern” is better implemented as an implementation of Iterator or whatever your language calls that. Everyone knows what “for x in thing” means, but wtf does it mean to “visit” something?