title: When recasting in Swift, when do you use "<object> as <type>" and when to use <type>(<object>)
body: <p>For example this code works:</p>
  
  <pre><code>var i = 5
  var  str: String
  str = String(i)
  </code></pre>
  
  <p>but this does not:</p>
  
  <pre><code>str = i as String
  </code></pre>
  
  <p>On the other hand this code works.</p>
  
  <pre><code>let controller : MyViewController
  controller = storyboard?.instantiateViewController(withIdentifier: "MyViewController") as! MyViewController
  </code></pre>
  
  <p>but this does not:</p>
  
  <pre><code>controller = MyViewController(storyboard?.instantiateViewController(withIdentifier: "MyViewController"))
  </code></pre>