What Haskell contributes (in a concrete implementation, the ideas go back to Moggi's theory) is the monadic encapsulation of effects, which I treat as a separate point under (viii). Monadic encapsulation of effects is not absence of effects. It's a reflection of effects at the type level.
http://research.microsoft.com/en-us/um/people/simonpj/papers...
hello :: IO () hello = putStrLn "Hello World"
`hello` is a "pure" value of type IO (). putStrLn a "pure" function of type -> IO ()
IO () is a value like any other "pure" value, like [Int].
The statement
puts ("hello");
is a "pure" value of type int.The C equivalent of
putStrLn "hello"
is probably actually void putsHello(void) {
puts("hello");
}
Unfortunately, function definitions aren't something you can really manipulate at runtime in C.https://news.ycombinator.com/item?id=9085403
Haskell IO is severely misunderstood.
Or are you talking about divergent side-effects like bottom and exceptions?
That said, I was talking about effects in general, including non-termination, exceptions, concurrency ...