Published: 11 February 2023
Joseph Junker discusses how the visitor pattern can be used to mix functional and object oriented programming in a beneficial way.
- The visitor pattern enables a beneficial mixing of functional and object oriented programming and has a deep and rigorous connection to type theory
- Functional programming makes it easy to define new functions, and hard to add new data, object oriented programming makes it easy to define new data, and hard to add new functions
- Can make the visitors more lightweight by just making them into TS/JS objects