Invariant vs Immutable - What's the difference?
invariant | immutable |
not varying; constant
(mathematics) Unaffected by a specified operation (especially by a transformation)
(computing, programming) Neither covariant nor contravariant.
Unable to be changed without exception.
(programming, of a variable) Not able to be altered in the memory after its value is set initially, such as a constant.
As adjectives the difference between invariant and immutable
is that invariant is not varying; constant while immutable is unable to be changed without exception.As nouns the difference between invariant and immutable
is that invariant is an invariant quantity, function etc while immutable is something that cannot be changed.invariant
English
Adjective
(en adjective)Synonyms
* (not varying) invariableDerived terms
* class invariantimmutable
English
Adjective
(-)- The government has enacted an immutable law.
