Re:Functional thinking: Why functional programming is on the...
by Chris_Newton on Tuesday January 29, 2013 @08:14PM
(#5137507)
IO's general status as the "Unsafe Pandora's Box" is a wart in Haskell.
Isn’t that rather like saying mutable variables are a wart in C? :-)
Re:Functional thinking: Why functional programming is on the...
by tikhonj on Tuesday January 29, 2013 @10:16PM
(#5137846)
It's more like saying void pointers are a wart in C. It's appropriate in two ways: for one, void pointers are a wart, and for two, there's no good way to get rid of them without radically changing the language.
http://www.haskell.org/pipermail/haskell/2005-October/016574...
The argument usually seems to play out as "their denotation is uncertain" and therefore they get unceremoniously thrown into the IO monad. I tend to agree with that in that I feel a major point of purity is that it gives you a world sufficiently far from the reality of the RTS to play in.
IO's general status as the "Unsafe Pandora's Box" is a wart in Haskell. I'd much prefer it be called the RTS monad and have something like IOSpec's Teletype type performing the classic IO. It's fixed by convention now though.