Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeConcepts
Mutability

Mutability

Mutable means that a memory location can be reassigned new values.

Related concepts:  ValueAssignmentVariable

Closest Wikipedia entry:  Immutable object

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Mutability is based on principled authoritative sources such as:

Types and Programming Languages - Section 13

Misconceptions about Mutability
8 documented Misconceptions

Any LanguageJavaJavaScriptPythonScratch
Check Yourself
Misconception
FinalReferenceImpliesImmutability — Java
An object referred to by a final variable is an immutable object
Misconception
ImmutableRequiresFinalParameters — Java
Immutable classes need final constructor/method parameters
Misconception
PrivateFieldsImplyImmutability — Java
A class where all fields are private is immutable
Misconception
PrivateMeansFinal — Java
A private field cannot be changed
Misconception
ThisAssignable — Java
One can assign to this
Misconception
ConstReferenceImpliesImmutability — JavaScript
An object referred to by a const variable is an immutable object
Misconception
ThisAssignable — JavaScript
One can assign to this
Misconception
SelfAssignable — Python
Reassigning self changes the object on which a method is called

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors