title: Why use the Visitor Pattern?
body: <p><b>Duplicate of: <a href="https://stackoverflow.com/questions/255214/when-should-i-use-the-visitor-design-pattern">When Should I Use The Visitor Design Pattern</a></b></p>
  
  <p>Why would someone want to use the visitor pattern? I've read a couple of articles, but I'm not getting something.</p>
  
  <p>If I need a function to bill a custom, I could use</p>
  
  <pre><code>Custom.Accept(BillVisitor)
  </code></pre>
  
  <p>or something like</p>
  
  <pre><code>Bill(Customer)
  </code></pre>
  
  <p>The second is less complex, and the Bill function is still separated from the Customer class. So why would I want to use the visitor pattern?</p>