title: Managing flexible, typed, immutable data structures in Scala in 2.8.x
body: <p>This is a follow-up now that Scala 2.8.0 beta is out to this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/1710813/what-is-a-proper-way-to-manage-flexible-typed-immutable-data-structures-in-scal">What is a proper way to manage flexible, typed, immutable data structures in Scala?</a></p>
  
  <p>The new technique is to copy a case class, e.g.</p>
  
  <pre><code>case class Person(name:String, email:String)
  
  val bob = Person("Bob", "bob@z.com")
  val jill = bob.copy(name = "Jill")
  </code></pre>
  
  <p>This works great, except for the fact that Scala seems to limit me to 22 (?) properties in a case class.  That might seem like a lot, it's insufficient in my case.</p>
  
  <p>With 23, I get: "error: type Function23 is not a member of package scala".  I could possibly define my own Function23, etc., but I don't know the implications of that.</p>
  
  <p>So now I'm back to square one.  I need to use public vars, which I'm trying to avoid, or create a 26+ parameter constructor and a paired copy method.  Ick.</p>
  
  <p>22 seems like a rather arbitrary limit here.   Is there a way around this?</p>
  
  <p>This is for data import, which looks something like this:</p>
  
  <pre><code>new CatalogImportRecord() {
      override val List(SVal(vendorSku), SVal(title), IVal(issues),
        _, // YToMVal(termMonths),
        DVal(sellPrice), DVal(buyPrice), DVal(retailPrice), NotesVal(allowsNew, allowsRenewals),
        _) //DateValMdy(lastUpdated))
        = fields
  </code></pre>
  
  <p>You can see I commented out unused extractions to reduce the number of fields.</p>
  
  <p>Maybe there's a better way to do this.  I find this extraction technique a bit rigid, but that might be for the best.</p>