title: Why are constructor parameters made into members for case classes?
body: <pre><code>  {
        class MyClass(name: String) {} 
        val x = new MyClass("x")
        println(x.name)         // Error name is not a member of MyClass
    }
  </code></pre>
  
  <p>but</p>
  
  <pre><code>  {
        abstract class Base
  
        case class MyClass(name: String) extends Base {}
  
        var x = new MyClass("x")
        println(x.name)           // name is a member of MyClass
    }
  </code></pre>
  
  <p>So, what's the deal with case classes? Why are all of the constructor parameters turned into variables.</p>