Re: When and where to use Visitor Pattern?



multimethods/multiple dispatch are largely unsupported though.

if 'instanceof' is some form of reflection, then there are plenty of
people (well at least me) who prefer the type safety of visitors....in
fact in some sense I view visitors as typesafe reflection.

less clutter? I don't think that the visit method is particularly
prohibitive in terms of clutter, though I accept that visitors can
fracture your code into tiny itty bitty bits.

.



Relevant Pages