Re: When and where to use Visitor Pattern?
- From: "Ilja Preuß" <it@xxxxxxxxxxxxx>
- Date: Sat, 30 Apr 2005 07:28:51 +0200
paul campbell wrote:
> Yes the visitor is great at decoupling. Its especially good at
> "decoupling" all that useful positional context information that is
> essential to just about
> every graph traversal problem Ive ever encoutered :).
- Visitor is also very usefull for non-graphs (that is, single objects).
- In my experience, there actually are graph traversal problems that don't
need positional context information, or can be transformed to one that
doesn't.
- For some problems, the Visitor pattern actually is quite easy to extend so
that it takes positional context information into account.
- Nevertheless there are certainly graph traversal problems for which
Visitor isn't the best solution. That doesn't make it a useless pattern, of
course.
Cheers, Ilja
.
- Follow-Ups:
- Re: When and where to use Visitor Pattern?
- From: Rich MacDonald
- Re: When and where to use Visitor Pattern?
- References:
- When and where to use Visitor Pattern?
- From: Sam Hwang
- Re: When and where to use Visitor Pattern?
- From: Ilja Preuß
- Re: When and where to use Visitor Pattern?
- From: paul campbell
- When and where to use Visitor Pattern?
- Prev by Date: Re: When and where to use Visitor Pattern?
- Next by Date: Re: When and where to use Visitor Pattern?
- Previous by thread: Re: When and where to use Visitor Pattern?
- Next by thread: Re: When and where to use Visitor Pattern?
- Index(es):