title: Swift 4: type(of:self).description() differs from String(describing: type(of:self))
body: <p>I need to determine the dynamic type of my object in a method that is implemented in a super class. The super class is called BaseClient and DisplayClient inherits from it.</p>
  
  <p>I only need the class name, not the package name. This is what I tried:</p>
  
  <pre><code>print("1", String(describing: type(of: self))) // DisplayClient
  print("2", type(of: self))                     // DisplayClient
  print("3", type(of: self).description())       // package.DisplayClient
  print("4", "\(type(of: self))")                // DisplayClient
  </code></pre>
  
  <p>Why does </p>
  
  <pre><code> type(of: self).description()
  </code></pre>
  
  <p>return package.DisplayClient while the others only return the class name? I wonder what is called internally when I use String(describing: type(of: self)). I would assume this does exactly what I do (call describing()).</p>
  
  <p>Where can I find more info on how the strings get generated internally?</p>
  
  <p>The <a href="https://developer.apple.com/documentation/swift/string/2427941-init" rel="nofollow noreferrer">docs</a> say:</p>
  
  <p>Use this initializer to convert an instance of any type to its preferred representation as a String instance. The initializer creates the string representation of instance in one of the following ways, depending on its protocol conformance:</p>
  
  <ul>
  <li>If instance conforms to the TextOutputStreamable protocol, the result is obtained by calling instance.write(to: s) on an empty string s.</li>
  <li>If instance conforms to the CustomStringConvertible protocol, the result is instance.description.</li>
  <li>If instance conforms to the CustomDebugStringConvertible protocol, the result is instance.debugDescription.</li>
  <li>An unspecified result is supplied automatically by the Swift standard library.</li>
  </ul>
  
  <p>But type(of: self) does not even have a description attribute. It only has a description() method. Is this some special case that is handled differently by the compiler?</p>