title: What is the difference between a var and val definition in Scala?
body: <p>What is the difference between a <code>var</code> and <code>val</code> definition in Scala and why does the language need both?  Why would you choose a <code>val</code> over a <code>var</code> and vice versa?</p>