Understanding Visitor Pattern: the art of double dispatch
Background
In the age of AI coding, writing code is no longer the primary bottleneck. The harder challenge is guiding coding agents to produce high-quality implementations. This usually means providing high-level constraints—such as software architecture and design patterns—instead of low-level implementation details.
Because of this shift, I believe understanding these concepts has become more important than ever. Take design patterns as an example. Before you can ask a coding agent to apply a particular pattern, you need to understand what the pattern is, what problem it solves, and when it should be used. Only then can you describe your intent precisely in natural language.