[Haskell-cafe] On the purity of Haskell

Steve Horne sh006d3592 at blueyonder.co.uk
Fri Dec 30 04:12:07 CET 2011


On 30/12/2011 01:40, Scott Turner wrote:
> On 2011-12-29 19:44, Steve Horne wrote:
>> [Interaction with its environment] is as much an aspect of what
>> Haskell defines as the functional core.
>>
>> Switching mental models doesn't change the logic
> But it does. Other languages do not support the distinction between pure
> functions and I/O effects.
Agreed. I said basically the same thing right at the start. This doesn't 
change any logic, though.

>> Either way, at run-time, Haskell is impure.
> No big deal. Who would want to use a language that you would call
> "pure"? Haskell has referential transparency. In Haskell, you have
> assurance that any function without IO in its type is as pure as the
> lambda calculus.
>
Absolutely. In my original post, of course, I made my "big implicit 
IORef parameter" argument that says C too is referentially transparent, 
but I also pointed out another view of transparency - the politician who 
buries the relevant in a huge pile of the irrelevant is not being 
transparent - and pointed out that in Haskell you can have zero, one or 
many IORefs - you can focus in on what is relevant.

I actually thought this point would make Haskell advocates happy, but no 
sign of that yet.




More information about the Haskell-Cafe mailing list