General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
T J
ThePrimeTime
comments
Comments by "T J" (@TJ-hs1qm) on "I Interviewed Uncle Bob" video.
The Visitor Pattern is just another attempt to solve the Expression Problem: The visitor pattern is a solution to a more general design problem: I have a hierarchy of different classes. Each class supports various common operations. We would now like to extend that hierarchy, without having to change the existing hierarchy (e.g. because it is defined by a library we do not have the source code to). We can add more classes, which must support all required operations. We can add more operations, which must be supported by all classes in the hierarchy. When designing a hierarchy, we can choose which of the two extension directions we want to make easy. (Trying to do both is called the Expression Problem and is extremely tricky.) google: does-the-visitor-pattern-prevent-the-need-to-modify-existing-code-when-adding-ne
1
love FORTH !
1