Content deleted Content added
Added Reference to Mutability and Immutability. |
Removed More Cititations Needed which was added in 2011. This page has a very good references, and explains the concept in a holistic manner with multiple examples and references. |
||
Line 1:
{{short description|Object whose state cannot be modified after it is created}}
{{Redirect2|Immutable|Immutability|the Christian doctrine|Immutability (theology)}}
In [[object-oriented computer programming|object-oriented]] and [[Functional programming|functional]] programming, an '''immutable object''' (unchangeable<ref>{{cite web|url=http://www.oxfordlearnersdictionaries.com/definition/english/immutable|title=immutable adjective - Definition, pictures, pronunciation and usage notes - Oxford Advanced Learner's Dictionary at OxfordLearnersDictionaries.com|website=www.oxfordlearnersdictionaries.com}}</ref> object) is an [[object (computer science)|object]] whose state cannot be modified after it is created.<ref name=Goetz>Goetz et al. ''Java Concurrency in Practice''. Addison Wesley Professional, 2006, Section 3.4. Immutability</ref> This is in contrast to a '''mutable object''' (changeable object), which can be modified after it is created. <ref>{{cite web|url=https://web.mit.edu/6.005/www/fa16/classes/09-immutability/|title=6.005 — Software Construction}}</ref> In some cases, an object is considered immutable even if some internally used attributes change, but the object's state appears unchanging from an external point of view. For example, an object that uses <!--
YES, THIS IS SPELLED CORRECTLY. IT'S *NOT* "memo*r*ization". READ THE LINKED ARTICLE.
|