but WHY visitor pattern bad
grog love grug nice words for all other ideas.
but grug say visitor pattern bad and link to wikipedia. wikipedia not have opinion. wikipedia "neutral".
grog like grug's other opinions on fighting complexity demon. grog like to know what grug do instead of visit.
https://www.infoworld.com/article/2336201/complexity-bad-an-interview-with-carson-gross.html
Gross: Yeah, I’m not 100% against the visitor pattern, despite what the grugbrain essay says. (In general, I’m not 100% for or against anything in software development.) However, I often think it’s better to encode operations directly in a tree rather than have another side thingie that performs operations over the tree. Sometimes this mixes concerns a bit, but I don’t mind that in this case.
As an example, in Hyperscript, the parse tree elements have the eval methods defined on them and are defined directly in the spot they are parsed. This mixes concerns, but I think it adds clarity to the program, because when you want to understand how, for example, the “wait” command works, you can go to one place and see how it’s both parsed and evaluated. I find that very useful.