[Haskell-cafe] Reddy on Referential Transparency

Chris Dornan chris at chrisdornan.com
Fri Jul 27 20:19:40 CEST 2012

> So a language is referentially transparent if replacing a sub-term with another with the same
> denotation doesn't change the overall meaning?

Isn't this just summarizing the distinguishing characteristic of a denotational semantics?

My understanding is that RT is about how easy it is to carry out _syntactical_ transformations
of a program that preserve its meaning. For example, if you can freely and naively inline a
function definition without having to worry too much about context then your PL is deemed
to possess lots of RT-goodness (according to FP propaganda anyway; note you typically can't
freely inline function definitions in a procedural programming language because the actual
arguments to the function may involve dastardly side effects; even with a strict function-calling
semantics divergence will complicate matters).


More information about the Haskell-Cafe mailing list