Talk:Single-serving visitor pattern

From Wikipedia, the free encyclopedia

The difference between this and Visitor is never clearly explained. The difference of what do they do is said (several times, indeed), but not how is that behaviour done. It's not until the implementation example in C++ that we can see that the method is static and the visitor is allocated and destroyed within it. It would be nice if somebody just wrote it down somewhere before the Pros/Cons section. --Euyyn

[edit] Single-serving visitor limited to non-gc languages?

Ummm ... I'm in a hurry and might be getting this wrong, but isn't this just a work-around so that a the visitor pattern can be used in non-garbage-collected languages? -- In other words, you would never want to use this pattern e.g. in Java, right? If so, please state that somewhere for clarification. Thanks a bunch. -- 193.99.145.162 10:30, 26 October 2006 (UTC)

[edit] Same here

Ya, I agree, this page looks more like the description of a particular implementation than a new pattern or pattern variation. As pattern should remain generic and not language oriented (they are design pattern). Tobei 15:10, 3 May 2007 (UTC)

[edit] Why?

So, if ApplyTo is static, why can't all of what ApplyTo does be contained within that static method or other static methods. Alan Evans 11:58, 24 October 2007 (UTC)