Basic Syntax

Immutable

English

Overview

The property of a value that can't be changed once created.

Details

The property that state can't be changed after creation, which prevents unexpected side effects and increases safety in concurrent processing. Strings are implemented as immutable in many languages, so every concatenation creates a new object -- doing lots of concatenation in a loop is a common source of performance problems.

More Programming terms