title: Class init with many properties
body: <p>I am learning Swift and I am currently going over initializers. I created a test project with a simple inheritance classes relationship. I set 10 properties to each class and all works fine. However, I feel that I am missing something, it just looks way too long and messy (specially ClassB init), any clues of shorting my code yet keeping it kosher?</p>
  
  <p>ClassA:</p>
  
  <pre><code>class ClassA: NSObject {
  
  var a1: Int
  var a2: Int
  var a3: Int
  var a4: Int
  var a5: Int
  var a6: Int
  var a7: Int
  var a8: Int
  var a9: Int
  var a10: Int
  
  init (a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int, a7: Int, a8: Int, a9: Int, a10: Int) {
      self.a1 = a1
      self.a2 = a2
      self.a3 = a3
      self.a4 = a4
      self.a5 = a5
      self.a6 = a6
      self.a7 = a7
      self.a8 = a8
      self.a9 = a9
      self.a10 = a10
  }
  }
  </code></pre>
  
  <p>ClassB:</p>
  
  <pre><code>class ClassB: ClassA {
  
  var b1: Int
  var b2: Int
  var b3: Int
  var b4: Int
  var b5: Int
  var b6: Int
  var b7: Int
  var b8: Int
  var b9: Int
  var b10: Int
  
  init (a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int, a7: Int, a8: Int, a9: Int, a10: Int, b1: Int, b2: Int, b3: Int, b4: Int, b5: Int, b6: Int, b7: Int, b8: Int, b9: Int, b10: Int) {
      self.b1 = b1
      self.b2 = b2
      self.b3 = b3
      self.b4 = b4
      self.b5 = b5
      self.b6 = b6
      self.b7 = b7
      self.b8 = b8
      self.b9 = b9
      self.b10 = b10
      super.init(a1: a1, a2: a2, a3: a3, a4: a4, a5: a5, a6: a6, a7: a7, a8: a8, a9: a9, a10: a10)
  }
  }
  </code></pre>