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:

    People generally will soon understand that writers should be judged, not according to rules and species, which are contrary to nature and art, but according to the immutable principles of the art of composition, and the special laws of their individual temperaments.
    Victor Hugo (1802–1885)

    I wish you would not let him plunge into a ôvortex of
    Dissipation.ö I do not object to the Thing, but I cannot bear the
    expression; it is such thorough novel slang—and so old, that I
    dare say Adam met with it in the first novel he opened.
    Jane Austen (1775–1817)