title: Why do we start Visitor by calling Acceptor.accept(), and not Visitor.visit()?
body: <p>In Wikipedia <a href="http://en.wikipedia.org/wiki/Visitor_pattern#Java_example" rel="noreferrer">sample</a> and in GoF book, usage of Visitor pattern is started by calling <code>accept</code> method on some acceptor. But why is it this way? Why can't we start calling <code>visit</code> method with desired acceptor as an argument? We can still make visitor behavior depend on 2 types -- of visitor and of acceptor (double dispatch) -- and we can eliminate redundant call (as it seems to me).</p>
  
  <p>Here's sample code to illustrate this:</p>
  
  <pre><code>public interface Visitor {
      void visit(AcceptorA acceptor);
      void visit(AcceptorB acceptor);
  }
  
  //
  // Visitor which sings
  // 
  class SingingVisitor implements Visitor {
      public void visit(AcceptorA acceptor) {
          System.out.println("sing A");
      }
  
      public void visit(AcceptorB acceptor) {
          System.out.println("sing B");
      }
  }
  
  
  //
  // Visitor which talks
  // 
  class TalkingVisitor implements Visitor {
      public void visit(AcceptorA acceptor) {
          System.out.println("talk A");
      }
  
      public void visit(AcceptorB acceptor) {
          System.out.println("talk B");
      }
  }
  
  //
  // Acceptor subclasses
  // 
  class AcceptorA implements BaseAcceptor {
  }
  
  class AcceptorB implements BaseAcceptor {
  }
  
  //
  // Launcher class
  // 
  class VisitorMain {
      public static void main(String[] args) {
          Visitor v = new TalkingVisitor();
          AcceptorA a = new AcceptorA();
          AcceptorB b = new AcceptorB();
  
          v.visit(a);
          v.visit(b);
          v = new SingingVisitor();
          v.visit(a);
          v.visit(b);
      }
  }
  </code></pre>