title: Why is it impossible to specify the default value of a Scala varargs parameter?
body: <p>I wrote a class which accepts a varargs as a parameter, and specify its default so that a user can often instantiate it without specifying a parameter:</p>
  
  <pre><code>class MyClass(values: Int* = 42) { }
  </code></pre>
  
  <p>However, the compiler and the REPL give me the following errors:</p>
  
  <pre><code>&lt;console&gt;:7: error: type mismatch;
   found   : Int(42)
   required: Int*
         class MyClass(values: Int* = 42) { }
                                  ^
  &lt;console&gt;:7: error: a parameter section with a `*'-parameter is not allowed to have default arguments
         class MyClass(values: Int* = 42) { }
  </code></pre>
  
  <p>As a workaround, I tried the following, but it didn't work either: (it's very ambiguous obviously.)</p>
  
  <pre><code>class MyClass(value: Int = 42, otherValues: Int*) { }
  </code></pre>
  
  <p>I wonder why it is unallowed to have the default for a varargs parameter.  What is the reasoning or technical reason lying under here?  (My guess is that specifying an empty varargs would require some special syntax or idiom, but I'm not sure if this is an enough reason.)</p>