Skip to Content.
Sympa Menu

gang-of-4-patterns - RE: [gang-of-4-patterns] Benefits of the visitor pattern in Go4's example - I don't understand

gang-of-4-patterns AT lists.cs.illinois.edu

Subject: Design Patterns discussion

List archive

RE: [gang-of-4-patterns] Benefits of the visitor pattern in Go4's example - I don't understand


Chronological Thread 
  • From: "Chris Finlayson" <cfinlayson AT vls-inc.com>
  • To: <gang-of-4-patterns AT cs.uiuc.edu>
  • Subject: RE: [gang-of-4-patterns] Benefits of the visitor pattern in Go4's example - I don't understand
  • Date: Mon, 22 Mar 2004 15:10:08 -0700
  • Importance: Normal
  • List-archive: <http://mail.cs.uiuc.edu/pipermail/gang-of-4-patterns/>
  • List-id: Design Patterns discussion <gang-of-4-patterns.cs.uiuc.edu>

[snip[
 why bother with the double-dispatch structure, is my fundamental
question, with this simple example?  I'm not sure what you mean by "double-dispatch" structure. 
[snip]
 
see p. 338 of GO4 - (not verbatim) - At the heart of the Visitor pattern is its ability to add operations to classes w/out changing them by using the double-dispatch technique (i.e. the accept/visit methods).
 
I was corrupting terminology, calling to attention the seemingly-over-complex model of solving the problem by adding accept/visit methods (the double-dispatch technique) where appropriate.
 
==Chris.



Archive powered by MHonArc 2.6.16.

Top of Page