Re: [Haskell-cafe] meaning of referential transparency

2013-04-06 Thread Roman Cheplyaka
* Henning Thielemann lemm...@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

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] meaning of referential transparency

2013-04-06 Thread Kim-Ee Yeoh
On Sun, Apr 7, 2013 at 12:43 AM, Henning Thielemann
lemm...@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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] meaning of referential transparency

2013-04-06 Thread Eli Frey
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 k...@atamo.com wrote:

 On Sun, Apr 7, 2013 at 12:43 AM, Henning Thielemann
 lemm...@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@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] meaning of referential transparency

2013-04-06 Thread Edsko de Vries
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 k...@atamo.com wrote:

 On Sun, Apr 7, 2013 at 12:43 AM, Henning Thielemann
 lemm...@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@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] meaning of referential transparency

2013-04-06 Thread Kim-Ee Yeoh
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.f...@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 k...@atamo.com wrote:

 On Sun, Apr 7, 2013 at 12:43 AM, Henning Thielemann
 lemm...@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@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] meaning of referential transparency

2013-04-06 Thread Sergey Bushnyak

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@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


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe