Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not map; pattern-matching is what replaces Visitor.


Visitor 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!).




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: