Henning Thielemann | 6 Apr 19:43 2013
Picon

meaning of "referential transparency"


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.
Roman Cheplyaka | 6 Apr 19:51 2013

Re: meaning of "referential transparency"

* Henning Thielemann <lemming <at> henning-thielemann.de> [2013-04-06 19:43:45+0200]
> 
> 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.

There has been a long discussion of RT a couple of years ago (?), which
originated at StackOverflow and moved to cafe. I'd enjoy re-reading it
if someone digs it up...

Roman
Kim-Ee Yeoh | 6 Apr 20:13 2013

Re: meaning of "referential transparency"

On Sun, Apr 7, 2013 at 12:43 AM, Henning Thielemann
<lemming <at> henning-thielemann.de> 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.

Instead of a immaculately precise definition, may I suggest going
about it from the practical benefits POV? RT matters so much in
Haskell because of the engineering leverage it gives us. Bird's Pearls
are a good source of Why Equational Reasoning Matters.

-- Kim-Ee
Eli Frey | 6 Apr 20:21 2013
Picon

Re: meaning of "referential transparency"



On Sat, Apr 6, 2013 at 11:13 AM, Kim-Ee Yeoh <ky3 <at> atamo.com> wrote:
On Sun, Apr 7, 2013 at 12:43 AM, Henning Thielemann
<lemming <at> henning-thielemann.de> 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.

Instead of a immaculately precise definition, may I suggest going
about it from the practical benefits POV? RT matters so much in
Haskell because of the engineering leverage it gives us. Bird's Pearls
are a good source of Why Equational Reasoning Matters.

-- Kim-Ee

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Kim-Ee Yeoh | 6 Apr 20:29 2013

Re: meaning of "referential transparency"

Should probably include the Reddit convo ongoing as we speak (zomg, it's live!):

http://www.reddit.com/r/haskell/comments/1bsitm/lazy_io_breaks_equational_reasoning/

Not everyone here is a regular there.

-- Kim-Ee

On Sun, Apr 7, 2013 at 1:21 AM, Eli Frey <eli.lee.frey <at> gmail.com> wrote:
> Links
>
> SO:
> http://stackoverflow.com/questions/210835/what-is-referential-transparency
>
> Reddit discussions of said SO question.
>
> http://www.reddit.com/r/haskell/comments/x8rr6/uday_reddy_on_referential_transparency_and_fp/
>
> http://www.reddit.com/r/haskell/comments/xgq27/uday_reddy_sharpens_up_referential_transparency/
>
> This was a fascinating exchange and I'm glad to be reminded to revisit it
> :).
>
>
> On Sat, Apr 6, 2013 at 11:13 AM, Kim-Ee Yeoh <ky3 <at> atamo.com> wrote:
>>
>> On Sun, Apr 7, 2013 at 12:43 AM, Henning Thielemann
>> <lemming <at> henning-thielemann.de> 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.
>>
>> Instead of a immaculately precise definition, may I suggest going
>> about it from the practical benefits POV? RT matters so much in
>> Haskell because of the engineering leverage it gives us. Bird's Pearls
>> are a good source of Why Equational Reasoning Matters.
>>
>> -- Kim-Ee
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe <at> haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
Edsko de Vries | 6 Apr 20:27 2013
Picon

Re: meaning of "referential transparency"

I have quite a detailed discussion of this concept, and related concepts, in Section 2.8 of my PhD thesis (https://www.cs.tcd.ie/Edsko.de.Vries/pub/MakingUniquenessTypingLessUnique-screen.pdf).

-E


On Sat, Apr 6, 2013 at 7:13 PM, Kim-Ee Yeoh <ky3 <at> atamo.com> wrote:
On Sun, Apr 7, 2013 at 12:43 AM, Henning Thielemann
<lemming <at> henning-thielemann.de> 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.

Instead of a immaculately precise definition, may I suggest going
about it from the practical benefits POV? RT matters so much in
Haskell because of the engineering leverage it gives us. Bird's Pearls
are a good source of Why Equational Reasoning Matters.

-- Kim-Ee

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Sergey Bushnyak | 7 Apr 00:56 2013
Picon

Re: meaning of "referential transparency"

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
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
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 
produce the
same output no matter what the overall state of the computation is. 
Haskell, like
any other pure functional language, is said to be “referentially 
transparent” or “side-
effect free.” This property does not hold for imperative languages, 
where assign-
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 
both calls.

The good thing about referential transparency is that it simplifies 
program anal-
ysis and transformation since a closed expression always denotes the 
same value
independent of the context, and may be moved around freely. A closed 
expression is
an expression that contains no references to external names other than 
global iden-
tifiers."

--

-- 
Best regards,
Sergey Bushnyak

Gmane