|
|
|
|
|
by mcv
2667 days ago
|
|
This... I can actually see the point in this. The Visitor pattern is one of those patterns I never really saw the point of, and which mostly struck me as an over-engineered hack about a shortcoming in a language. This example actually makes clear why you'd need to do it this was in C++ at least. Not sure which other languages would need this. It's certainly not pretty. Then again, dispatching twice is not so bad compared to your average Java-style over-engineering. |
|
[0] https://eli.thegreenplace.net/2016/the-expression-problem-an...