On Saturday 06 July 2002 06:32 am, Dossy wrote:
> > and i think Michael, here, makes a good point: "I've passed self
> > before, but I can't ever remember thinking it was a good idea."
>
> And I asked:  Do people never use the Visitor pattern?

We have, but don't necessarily think it's the best of both worlds.

Like many of the patterns in the GOF book, it comes across as more of 
a reaction to language limitations than a first-class idea. The 
problem they were trying to solve is the lack of multiple dispatching 
and open classes in C++.

Since Ruby has open classes (and iterators), the motivation for using 
the cumbersome double-dispatching of the Visitor pattern is largely 
absent.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE