(Im)mutability

Immutability refers to data that does not change - a value is set once and never modified. Conversely, mutability refers to data structures that do change through time.

Scala encourages immutability over mutability, which can prevent a number of issues regarding concurrent reads and writes of shared data.

Start by watching this video which explains the concept of immutability, why it is important, and how we can use it in Scala.

Exploring Immutability in Scala - BoldRadius Blog

For a more in depth look at immutability, read "val" versus "var" Declarations in Scala by Mohamed Sanaulla.

Don't forget to take the short quiz below on (Im)mutability before moving on to Inheritance!