title: when do Scala functions execute
body: <p>In Javascript I can describe a function like so</p>
  
  <pre><code>function showString(){ console.log("this is a string") }; 
  </code></pre>
  
  <p>Such that in the console there is a strict difference between the function and the executed function </p>
  
  <pre><code>&gt; function showString(){ console.log("this is a string") }; 
  &gt; showString
  function showString(){ console.log("this is a string") }
  &gt; showString()
  this is a string 
  </code></pre>
  
  <p>In Scala I am now doing the same thing; </p>
  
  <pre><code>def showname() = println("this is a string")
  </code></pre>
  
  <p>However, when I run this is in the console, it always seems to execute the function instead of also being able to just pass the function around: </p>
  
  <pre><code>scala&gt; def showname() = println("this is a string")
  showname: ()Unit
  scala&gt; showname // I am expecting a function, not an executed function
  this is a string
  scala&gt; showname()
  this is a string // I am expecting an executed function
  </code></pre>
  
  <p>Is Scala handling functions differently? Is my expectation wrong? </p>