title: Swift calling static methods: type(of: self) vs explicit class name
body: <p>In swift, an instance <code>func</code> can't call a <code>static/class func</code> without prefixing the method call with the class name. OR you can use <code>type(of: self)</code>, e.g</p>
  
  <pre><code>class Foo {
      static func doIt() { }
  
      func callIt() {
          Foo.doIt() // This works
          type(of: self).doIt() // Or this
  
          doIt() // This doesn't compile (unresolved identifier)
      }
  }
  </code></pre>
  
  <p>My question is, what's the difference here?
  Is it just a matter of coding style, or is there some difference e.g. static or dynamic dispatch going on?</p>
  
  <p>If it is just coding style, what's the preferred style?</p>