Immutable Object

In object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created. In some cases, an object is considered immutable even if some internally used attributes change but the object's state appears to be unchanging from an external point of view. For example, an object that uses memoization to cache the results of expensive computations could still be considered an immutable object.

Immutable objects are often useful because they are inherently thread-safe. Other benefits are that they are simpler to understand and reason about and offer higher security than mutable objects.

Read more about Immutable Object:  Background, Implementation, Copy-on-write, Usage

Famous quotes containing the words immutable and/or object:

    Of course politics is an interesting and engrossing thing. It offers no immutable laws, nearly always prevaricates, but as far as blather and sharpening the mind go, it provides inexhaustible material.
    Anton Pavlovich Chekhov (1860–1904)

    If thinking is like perceiving, it must be either a process in which the soul is acted upon by what is capable of being thought, or a process different from but analogous to that. The thinking part of the soul must therefore be, while impassable, capable of receiving the form of an object; that is, must be potentially identical in character with its object without being the object. Mind must be related to what is thinkable, as sense is to what is sensible.
    Aristotle (384–322 B.C.)