title: Why does Scala language require you initialize a instance variable instead of relying on a default value?
body: <p>Scala language requires you initialize your instance variable before using it. However, Scala does not provide a default value for your variable. Instead, you have to set up its value manually by using the wildcard underscore, which acts like a default value, as follows</p>
  
  <pre><code>var name:String = _
  </code></pre>
  
  <p>I know, i know... I can define a constructor in the class definition, which takes as parameter our instance variable, so Scala does not force its initialization as shown below</p>
  
  <pre><code>class Person(var name:String) 
  </code></pre>
  
  <p>However, i need to declare it in the body because i need to use a Java annotation whose ElementType is FIELD or METHOD; that is, it can just be applied to either a instance variable or method declared in the body of our class. </p>
  
  <p>Question: Why does Scala language require you initialize a instance variable - be it a default value _ or whatever you want - declared in the body of a class instead of relying on a default value ?</p>