title: == and eq Operators
body: <pre><code>scala&gt; val x = "a"
  x: String = a
  
  scala&gt; val y = "a"
  y: String = a
  </code></pre>
  
  <p>As I understand, <code>==</code> will call <code>equals</code> (value equality).</p>
  
  <pre><code>scala&gt; x == y
  res18: Boolean = true
  </code></pre>
  
  <p>But, <code>x eq y</code>, unexpected to me, shows true. <code>eq</code>, as I understand, checks for <code>object identity</code>. </p>
  
  <pre><code>scala&gt; x eq y
  res19: Boolean = true
  </code></pre>
  
  <p>Is the <code>Scala</code> compiler smart enough to return the same (identity) String object? I believe the term is <a href="http://en.wikipedia.org/wiki/String_interning" rel="nofollow">interning</a>.</p>
  
  <p>Or, is <code>eq</code> actually performing a value equality?</p>