Hacker News new | past | comments | ask | show | jobs | submit login

Visitor pattern definitely does not automatically improve readability or clarity. (In the general case! Summing values would be an exception.) In fact, I'd see it as a performance/readability tradeoff in any language where recursive tree processing is ergonomic.

Not even knowing the language involved, there's really not much to say.




I'm not referring to the Visitor pattern in Abstract, I'm referring to the specific solution the author of the article we are discussing employed.

There is no such thing as a pattern that always increases clarity. That's not what patterns are for, so that's unsurprising. It's the case though that this specific application has pretty much only benefits.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: