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)