Referential transparency is a property of a logical system or programming language.
The concept is somewhat unclear, and has been used in different ways.
It was introduced by Quine in Word and Object (1960). Hereis the exact quote:
A mode of containment ϕ is referentially transparent if, whenever an occurrence of a singular term t is purely referential in a term or sentence ψ(t), it is purely referential also in the containing term or sentence ϕ(ψ(t)).
This is delightfully obscure, but the following example from [Søndergaard and Sestoft 1994] makes it better.
The roman emperor Cicero was in the past anglicized as Tully.
Hence, we have
Let
Then we have that , but .
Hence the mode of containment is not referentially transparent.
However, the term was introduced to PL by Christopher Strachey. Here is the exact quote:
One of the most useful properties of expressions is that called by Quine [4] referential transparency. In essence this means that if we wish to find the value of an expression which contains a sub-expression, the only thing we need to know about the sub-expression is its value. Any other features of the sub-expression, such as its internal structure, the number and nature of its components, the order in which they are evaluated or the colour of the ink in which they are written, are irrelevant to the value of the main expression.
We are quite familiar with this property of expressions in ordinary mathematics and often make use of it unconsciously.
The concept of referential transparency is due to W. V. O. Quine
Referential transparency was introduced to programming languages by Christopher Strachey in the influential 1967-8 set of lecture notes entitled Fundamental Concepts in Programming Languages.
Referential transparency on Wikipedia.
A fierce discussion on StackOverflow on purity vs. referential transparency.
See also:
Søndergaard, H., Sestoft, P. Referential transparency, definiteness and unfoldability. Acta Informatica 27, 505–517 (1990). https://doi.org/10.1007/BF00277387 [pdf]