title: Default value for optional generic parameter in Swift function
body: <p>Is it possible to give an optional generic parameter a default value?</p>
  
  <p>I'm trying to do something like this:</p>
  
  <pre><code>func addChannel&lt;T&gt;(name: String, data: T? = nil) -&gt; Channel {
  
  }
  
  let myChannel = addChannel("myChannelName")
  </code></pre>
  
  <p>But I'm getting an error saying</p>
  
  <p><code>Argument for generic parameter 'T' could not be inferred</code></p>
  
  <p>Is it just a case of what I'm trying to do being impossible?</p>