In
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, having value semantics (also value-type semantics or copy-by-value semantics) means for an object that only its value counts, not its identity.
Immutable objects have value semantics trivially, and in the presence of mutation, an object with value semantics can only be uniquely-referenced at any point in a program.
The concepts that are used to explain this concept are
extensionality
In logic, extensionality, or extensional equality, refers to principles that judge objects to be equal if they have the same external properties. It stands in contrast to the concept of intensionality, which is concerned with whether the internal ...
,
definiteness
In linguistics, definiteness is a semantic feature of noun phrases, distinguishing between referents or senses that are identifiable in a given context (definite noun phrases) and those which are not (indefinite noun phrases). The prototypical d ...
,
substitutivity of identity,
unfoldability, and
referential transparency
In computer science, referential transparency and referential opacity are properties of parts of computer programs. An expression is called ''referentially transparent'' if it can be replaced with its corresponding value (and vice-versa) withou ...
.
References
Programming paradigms
{{Compu-prog-stub