New Jobs for Every Kind of Thing
New Jobs for Every Kind of Thing: Visitor: New Jobs Without Touching Every Class.
Updated
- Visitor: New Jobs Without Touching Every Class (Freelancer): When every new job on a tree of objects (describe it, count it, check it) means a new method in every class of the tree, each job ends up scattered across all of them; the Visitor pattern puts each job in one object with a method for each kind of piece, so a new job is one new class and the pieces never change.