[Haskell-cafe] meaning of "referential transparency"
sergey.bushnyak at sigrlami.eu
Sun Apr 7 00:56:11 CEST 2013
On 04/06/2013 08:43 PM, Henning Thielemann wrote:
> Can someone enlighten me about the origin of the term "referential
> transparency"? I can lookup the definition of "referential
> transparency" in the functional programming sense in the Haskell Wiki
> and I can lookup the meaning of "reference" and "transparency" in a
> dictionary, but I don't know why these words were chosen as name for
> this defined property.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
I will recommend you book "Modern Compiler Design" by Dick Grune and others.
Besides discussing different topics, authors use Haskell as example for
describing ideas behind compilers for functional language. Here is
citation from book on RT, which not explain who coined this term, but
describes it generally :
"By definition, a function in Haskell defines a fixed relation between
inputs and out-
put: whenever a function f is applied to the argument value arg it will
same output no matter what the overall state of the computation is.
any other pure functional language, is said to be “referentially
transparent” or “side-
effect free.” This property does not hold for imperative languages,
ments to global variables and through pointers may cause two function
calls f arg to
yield different results, even when the argument value arg is the same in
The good thing about referential transparency is that it simplifies
ysis and transformation since a closed expression always denotes the
independent of the context, and may be moved around freely. A closed
an expression that contains no references to external names other than
More information about the Haskell-Cafe