Purity vs Referential transparency

If I gather in one place any three theorists of my acquaintance, at least two of them disagree on the meaning of the term “referential transparency.” And when I was a young student, a mentor of mine gave me a paper explaining that even if you consider only the professional literature, the phrase “referentially transparent” … Read more

Is Haskell truly pure (is any language that deals with input and output outside the system)?

Take the following mini-language: data Action = Get (Char -> Action) | Put Char Action | End Get f means: read a character c, and perform action f c. Put c a means: write character c, and perform action a. Here’s a program that prints “xy”, then asks for two letters and prints them in … Read more

What is referential transparency?

The term “referential transparency” comes from analytical philosophy, the branch of philosophy that analyzes natural language constructs, statements and arguments based on the methods of logic and mathematics. In other words, it is the closest subject outside computer science to what we call programming language semantics. The philosopher Willard Quine was responsible for initiating the … Read more