3 ms·
Not map; pattern-matching is what replaces Visitor.
by lmm 14y ago
Not map; pattern-matching is what replaces Visitor.
- Peaker 14y agoVisitor was about multiple dispatch, which multimethods, type-classes and pattern-matching can all handle. However, it was also about iterating an entire data structure (in the GoF example, a document hierarchy). This creates confusion as some emphasize the former (multimethods! pattern matching!) and some emphasize the latter (fmap! map!).