[Haskell-cafe] Reddy on Referential Transparency

wren ng thornton wren at freegeek.org
Mon Jul 30 07:16:57 CEST 2012

On 7/27/12 1:49 PM, Ross Paterson wrote:
> So a language is referentially transparent if replacing a sub-term with
> another with the same denotation doesn't change the overall meaning?
> But then isn't any language RT with a sufficiently cunning denotational
> semantics?  Or even a dumb one that gives each term a distinct denotation.

Yes, but such denotations aren't useful for very much. The whole point 
of denotational semantics is to assert that some (primitive) expressions 
denote the same thing, and then to derive that other expressions (e.g., 
whole programs) denote the same thing. If we say that every expression 
is different from every other expression, then ---for example--- the 
only semantics-preserving transformation is the identity transformation. 
Our semantics is, thus, worthless for vetting whether a compiler's 
transformation is "okay" or not. In fact, this model explains exactly 
nothing about the *meaning* of those expressions.

Live well,

More information about the Haskell-Cafe mailing list