title: Local parameters in Kotlin's primary constructor of a data class
body: <p>Regarding <code>data</code> classes it is forbidden to <strong>not</strong> use <code>var</code> or <code>val</code> keywords in the primary constructor, i.e. <em>every</em> parameter is implicitly turned into a class property. However, sometimes there are cases which I don't want each parameter to be turned into a class property.</p>
  
  <p>So, as far as I can see, there is no chance of passing a parameter in a primary constructor that is accessible only within the constructor and is forgotten after the construction of the instance has finished. Is there a good reason for this?</p>
  
  <p>The only way I see to get around this, is <strong>not</strong> to use <code>data</code> classes or to use a secondary constructor that allows for non-var/val-prefixed variables. However, having a lot of parameters that need to be passed, a secondary constructor would immensely inflate the class. Of course, I could wrap all the parameters into another object, but that would just kind of shift the problem to another place. </p>
  
  <p>Is there a recommended approach or pattern in order to cope with that?</p>