Lecture overview -- Keyboard shortcut: 'u'  Previous page: Referential Transparency - Practical Aspects -- Keyboard shortcut: 'p'  Next page: More Excercises -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 1 - Page 48 : 49
Programming Paradigms
Introduction to Functional Programming in Scheme
Referential Transparency

Referential transparency is a rather fuzzy and ambiguous idea

On this page we will quote and address different phrasings

  • Uday Reddy, Stack Overflow

    • The term "reference" is used in analytical philosophy to talk about the thing that an expression refers to. ... A context in a sentence is "referentially transparent" if replacing a term in that context by another term that refers to the same entity doesn't alter the meaning.

  • Stoy

    • The only things that matters about an expression is its value, and any subexpression can be replaced by any other equal in value

  • Wikipedia (as of August 5, 2013)

    • An expression is said to be referentially transparent if it can be replaced with its value without changing the behavior of a program

  • Landin

    • (a) each expression has a nesting subexpression structure, (b) each subexpression denotes something (usually a number, truth value or numerical function), (c) the thing an expression denotes, i.e., its "value", depends only on the values of its sub-expressions, not on other properties of them.

  • Bird and Wadler

    • The value of an expression depends only on the values of its constituent expressions (if any) and these subexpressions may be replaced freely by others possessing the same value

  • Stack Overflow, Brian Bondy

    • Referential transparency ... means that given a function and an input value, you will always receive the same output.

  • KN

    • In a given context, two expressions that are equal to each other may substitute each other