[Haskell-cafe] On the purity of Haskell
Gregg Reynolds
dev at mobileink.com
Fri Dec 30 16:50:02 CET 2011
On Dec 30, 2011, at 10:34 AM, Artyom Kazak wrote:
> Gregg Reynolds <dev at mobileink.com> писал(а) в своём письме Fri, 30 Dec 2011 17:23:20 +0200:
>
>> Regarding side-effects, they can be (informally) defined pretty simply: any non-computational effect caused by a computation is a side-effect.
>
> I wonder: can writing to memory be called a “computational effect”? If yes, then every computation is impure. If no, then what’s the difference between memory and hard drive?
>
Great question! It suggests that the line between computation and its side effects is not as clear-cut as we (well, I) thought.
If computations are Platonistic, mathematico-logical "things", then is actual computation a side-effect of the Platonic Idea? Heh heh.
> By the way, the Data.HashTable is in IO monad. Is it impure? Would it be pure if designers had chosen to use ST instead?
Dunno, somebody else will have to answer that one.
-Gregg
More information about the Haskell-Cafe
mailing list