[Haskell-cafe] Reddy on Referential Transparency

Ross Paterson ross at soi.city.ac.uk
Fri Jul 27 21:06:15 CEST 2012

On Fri, Jul 27, 2012 at 07:19:40PM +0100, Chris Dornan wrote:
> > 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?

Right, so where's the substance here?

> 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).

Ah, but we only think that because of our blinkered world-view.

Another way of looking at it is that the denotational semanticists have
created a beautiful language to express the meanings of all those ugly
languages, and we're programming in it.

More information about the Haskell-Cafe mailing list