title: creating a new instance of a type in scala
body: <p>If I have a class C defined as </p>
  
  <pre><code>class C[A]
  </code></pre>
  
  <p>is there any way to create a new instance of <code>A</code> within C? Something like</p>
  
  <pre><code>class C[A] {
    def f(): A = new A()
  }
  </code></pre>
  
  <p>I understand that, if this were possible, you'd probably have to specify the constructor arguments somewhere, and that's fine.</p>
  
  <p>If it's not possible, are there any design patterns for dealing with the sort of situation where you'd like to create a new instance of a type?</p>