Values and variables

A value is a field that can’t be updated after assignment.

val foo: Int = 2
// foo = 3 wouldn't compile.

A variable is a field that can be updated after assignment.

var foo: Int = 2
foo = 3

Also these can be made lazy.

lazy val foo: Int = 10 // Imagine this took a minute to calculate.